[llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/mul-neg-add.ll
Chris Lattner
lattner at cs.uiuc.edu
Sun May 8 14:41:32 PDT 2005
Changes in directory llvm/test/Regression/Transforms/Reassociate:
mul-neg-add.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+8 -0)
mul-neg-add.ll | 8 ++++++++
1 files changed, 8 insertions(+)
Index: llvm/test/Regression/Transforms/Reassociate/mul-neg-add.ll
diff -c /dev/null llvm/test/Regression/Transforms/Reassociate/mul-neg-add.ll:1.1
*** /dev/null Sun May 8 16:41:28 2005
--- llvm/test/Regression/Transforms/Reassociate/mul-neg-add.ll Sun May 8 16:41:18 2005
***************
*** 0 ****
--- 1,8 ----
+ ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0'
+
+ int %test(int %X, int %Y, int %Z) {
+ %A = sub int 0, %X
+ %B = mul int %A, %Y
+ %C = add int %B, %Z ; (-X)*Y + Z -> Z-X*Y
+ ret int %C
+ }
More information about the llvm-commits
mailing list