llvm.org GIT mirror llvm / 75954e0
test case we alredy get right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92380 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
178178 ; CHECK-NEXT: ret i32
179179 }
180180
181 define i32 @test13(i32 %X1, i32 %X2, i32 %X3) {
182 %A = sub i32 0, %X1
183 %B = mul i32 %A, %X2 ; -X1*X2
184 %C = mul i32 %X1, %X3 ; X1*X3
185 %D = add i32 %B, %C ; -X1*X2 + X1*X3 -> X1*(X3-X2)
186 ret i32 %D
187 ; CHECK: @test13
188 ; CHECK-NEXT: sub i32 %X3, %X2
189 ; CHECK-NEXT: mul i32 {{.*}}, %X1
190 ; CHECK-NEXT: ret i32
191 }
192