summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-09 17:48:57 +0000
committerChris Lattner <sabre@nondot.org>2005-09-09 17:48:57 +0000
commitdb9f4b9db49e9a08da60b9793d5934eff9c24a86 (patch)
treeaff27e08f17a95d4adb87b78cf0456b0cc47b6f0
parentce2173d098e9acf1c9f9b4d01eabd33229ea5e87 (diff)
downloadbcm5719-llvm-db9f4b9db49e9a08da60b9793d5934eff9c24a86.tar.gz
bcm5719-llvm-db9f4b9db49e9a08da60b9793d5934eff9c24a86.zip
New testcase, neither should require a register-register copy
llvm-svn: 23290
-rw-r--r--llvm/test/Regression/CodeGen/PowerPC/rlwimi-commute.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/Regression/CodeGen/PowerPC/rlwimi-commute.ll b/llvm/test/Regression/CodeGen/PowerPC/rlwimi-commute.ll
new file mode 100644
index 00000000000..e6719ebd878
--- /dev/null
+++ b/llvm/test/Regression/CodeGen/PowerPC/rlwimi-commute.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi &&
+; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'or '
+
+; Make sure there is no register-register copies here.
+
+void %test1(int *%A, int *%B, int *%D, int* %E) {
+ %A = load int* %A
+ %B = load int* %B
+ %X = and int %A, 15
+ %Y = and int %B, -16
+ %Z = or int %X, %Y
+ store int %Z, int* %D
+ store int %A, int* %E
+ ret void
+}
+
+void %test2(int *%A, int *%B, int *%D, int* %E) {
+ %A = load int* %A
+ %B = load int* %B
+ %X = and int %A, 15
+ %Y = and int %B, -16
+ %Z = or int %X, %Y
+ store int %Z, int* %D
+ store int %B, int* %E
+ ret void
+}
OpenPOWER on IntegriCloud