diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-09 17:48:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-09 17:48:57 +0000 |
commit | db9f4b9db49e9a08da60b9793d5934eff9c24a86 (patch) | |
tree | aff27e08f17a95d4adb87b78cf0456b0cc47b6f0 | |
parent | ce2173d098e9acf1c9f9b4d01eabd33229ea5e87 (diff) | |
download | bcm5719-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.ll | 26 |
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 +} |