[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/constants.ll
Jim Laskey
jlaskey at apple.com
Thu Aug 18 12:32:58 PDT 2005
Changes in directory llvm/test/Regression/CodeGen/PowerPC:
constants.ll added (r1.1)
---
Log message:
Add regression test to make sure that constants are generated optimally.
---
Diffs of the changes: (+51 -0)
constants.ll | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+)
Index: llvm/test/Regression/CodeGen/PowerPC/constants.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/constants.ll:1.1
*** /dev/null Thu Aug 18 14:32:56 2005
--- llvm/test/Regression/CodeGen/PowerPC/constants.ll Thu Aug 18 14:32:46 2005
***************
*** 0 ****
--- 1,51 ----
+ ; All of these ands and shifts should be folded into constants's
+ ; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
+ ; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
+ ; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep li | wc -l | grep 18
+
+ implementation ; Functions:
+
+ int %_Z2f1v() {
+ entry:
+ ret int 1
+ }
+
+ int %_Z2f2v() {
+ entry:
+ ret int -1
+ }
+
+ int %_Z2f3v() {
+ entry:
+ ret int 0
+ }
+
+ int %_Z2f4v() {
+ entry:
+ ret int 32767
+ }
+
+ int %_Z2f5v() {
+ entry:
+ ret int 65535
+ }
+
+ int %_Z2f6v() {
+ entry:
+ ret int 65536
+ }
+
+ int %_Z2f7v() {
+ entry:
+ ret int 131071
+ }
+
+ int %_Z2f8v() {
+ entry:
+ ret int 2147483647
+ }
+
+ int %_Z2f9v() {
+ entry:
+ ret int -2147483648
+ }
More information about the llvm-commits
mailing list