[llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/mul-factor3.ll mulfactor2.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 14 00:13:21 PST 2006
Changes in directory llvm/test/Regression/Transforms/Reassociate:
mul-factor3.ll added (r1.1)
mulfactor2.ll updated: 1.1 -> 1.2
---
Log message:
new testcase from a FIXME in the code
---
Diffs of the changes: (+16 -2)
mul-factor3.ll | 14 ++++++++++++++
mulfactor2.ll | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
Index: llvm/test/Regression/Transforms/Reassociate/mul-factor3.ll
diff -c /dev/null llvm/test/Regression/Transforms/Reassociate/mul-factor3.ll:1.1
*** /dev/null Tue Mar 14 02:13:19 2006
--- llvm/test/Regression/Transforms/Reassociate/mul-factor3.ll Tue Mar 14 02:13:09 2006
***************
*** 0 ****
--- 1,14 ----
+ ; This should be one add and two multiplies.
+
+ ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 2 &&
+ ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+
+ int %test(int %A, int %B, int %C) {
+ %aa = mul int %A, %A
+ %aab = mul int %aa, %B
+
+ %ac = mul int %A, %C
+ %aac = mul int %ac, %A
+ %r = add int %aab, %aac
+ ret int %r
+ }
Index: llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll
diff -u llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll:1.1 llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll:1.2
--- llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll:1.1 Sat Mar 4 03:35:02 2006
+++ llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll Tue Mar 14 02:13:09 2006
@@ -1,7 +1,7 @@
; This should turn into one multiply and one add.
-; RUN: llvm-as < mulfactor2.ll | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 &&
-; RUN: llvm-as < mulfactor2.ll | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+; RUN: llvm-as < %s | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 &&
+; RUN: llvm-as < %s | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
int %main(int %t) {
%tmp.3 = mul int %t, 12 ; <int> [#uses=1]
%tmp.4 = add int %tmp.3, 5 ; <int> [#uses=1]
More information about the llvm-commits
mailing list