llvm.org GIT mirror llvm / 22d0631
new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21787 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0'
1
2 int %test(int %X, int %Y, int %Z) {
3 %A = sub int 0, %X
4 %B = mul int %A, %Y
5 %C = add int %B, %Z ; (-X)*Y + Z -> Z-X*Y
6 ret int %C
7 }