[llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/mulfactor.ll
Chris Lattner
lattner at cs.uiuc.edu
Sat Mar 4 01:30:20 PST 2006
Changes in directory llvm/test/Regression/Transforms/Reassociate:
mulfactor.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+14 -0)
mulfactor.ll | 14 ++++++++++++++
1 files changed, 14 insertions(+)
Index: llvm/test/Regression/Transforms/Reassociate/mulfactor.ll
diff -c /dev/null llvm/test/Regression/Transforms/Reassociate/mulfactor.ll:1.1
*** /dev/null Sat Mar 4 03:30:18 2006
--- llvm/test/Regression/Transforms/Reassociate/mulfactor.ll Sat Mar 4 03:30:08 2006
***************
*** 0 ****
--- 1,14 ----
+ ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2
+
+ ; This should have exactly 2 multiplies when we're done.
+
+ int %f(int %a, int %b) {
+ %tmp.2 = mul int %a, %a
+ %tmp.5 = shl int %a, ubyte 1
+ %tmp.6 = mul int %tmp.5, %b
+ %tmp.10 = mul int %b, %b
+ %tmp.7 = add int %tmp.6, %tmp.2
+ %tmp.11 = add int %tmp.7, %tmp.10
+ ret int %tmp.11
+ }
+
More information about the llvm-commits
mailing list