3 ms·
The trophy case is here: https://www.cs.utah.edu/~regehr/souper/ https://www.cs.utah.edu/~regehr/souper/ Example program 6: https://www.cs.utah.edu/~regehr/sou
by millstone 6y ago
The trophy case is here: https://www.cs.utah.edu/~regehr/souper/ https://www.cs.utah.edu/~regehr/souper/
Example program 6: https://www.cs.utah.edu/~regehr/souper/output_6.html https://www.cs.utah.edu/~regehr/souper/output_6.html
int a, b;
void fn1() { b = a * ~1 == 1; }
Here we multiply an int by -2. LLVM emitted the multiply and compare, but Souper proved that no int multiplied by -2 can equal 1, so this could be optimized to 0.
By its nature Souper becomes less effective over time as its findings are incorporated into LLVM, so most of the trophies are old!