[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/div-2.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 7 08:27:29 PDT 2005



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

div-2.ll updated: 1.1 -> 1.2
---
Log message:

These don't need to be sdivs.


---
Diffs of the changes:  (+22 -1)

 div-2.ll |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletion(-)


Index: llvm/test/Regression/CodeGen/PowerPC/div-2.ll
diff -u llvm/test/Regression/CodeGen/PowerPC/div-2.ll:1.1 llvm/test/Regression/CodeGen/PowerPC/div-2.ll:1.2
--- llvm/test/Regression/CodeGen/PowerPC/div-2.ll:1.1	Fri Oct  7 01:10:03 2005
+++ llvm/test/Regression/CodeGen/PowerPC/div-2.ll	Fri Oct  7 10:27:12 2005
@@ -1,8 +1,29 @@
 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
 ; RUN: llvm-as < %s | llc -march=ppc32 | grep blr
 
-int %test(int %X) {
+int %test1(int %X) {
 	%Y = and int %X, 15
 	%Z = div int %Y, 4
 	ret int %Z
 }
+
+int %test2(int %W) {
+	%X = and int %W, 15
+	%Y = sub int 16, %X
+	%Z = div int %Y, 4
+	ret int %Z
+}
+
+int %test3(int %W) {
+	%X = and int %W, 15
+	%Y = sub int 15, %X
+	%Z = div int %Y, 4
+	ret int %Z
+}
+
+int %test4(int %W) {
+	%X = and int %W, 2
+	%Y = sub int 5, %X
+	%Z = div int %Y, 2
+	ret int %Z
+}






More information about the llvm-commits mailing list