diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 13:22:41 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-10-01 13:22:41 +0000 |
| commit | 6e96ac600f5c0a13824fb387d881e72789c55d02 (patch) | |
| tree | bc7846f9a86a7153ba8650868f00ab71ff66926d /llvm/test/CodeGen/SystemZ | |
| parent | 2fb10d188953860b653db2d2eb837ead75397de6 (diff) | |
| download | bcm5719-llvm-6e96ac600f5c0a13824fb387d881e72789c55d02.tar.gz bcm5719-llvm-6e96ac600f5c0a13824fb387d881e72789c55d02.zip | |
[SystemZ] Allow integer OR involving high words
llvm-svn: 191755
Diffstat (limited to 'llvm/test/CodeGen/SystemZ')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/asm-18.ll | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/asm-18.ll b/llvm/test/CodeGen/SystemZ/asm-18.ll index fc71895cd78..4d0547fd9ea 100644 --- a/llvm/test/CodeGen/SystemZ/asm-18.ll +++ b/llvm/test/CodeGen/SystemZ/asm-18.ll @@ -353,3 +353,45 @@ define void @f16() { call void asm sideeffect "stepc $0", "r"(i32 %or2) ret void } + +; Test immediate OR involving high registers. +define void @f17() { +; CHECK-LABEL: f17: +; CHECK: stepa [[REG:%r[0-5]]] +; CHECK: oihh [[REG]], 4660 +; CHECK: stepb [[REG]] +; CHECK: oihl [[REG]], 34661 +; CHECK: stepc [[REG]] +; CHECK: oihf [[REG]], 12345678 +; CHECK: stepd [[REG]] +; CHECK: br %r14 + %res1 = call i32 asm "stepa $0", "=h"() + %or1 = or i32 %res1, 305397760 + %res2 = call i32 asm "stepb $0, $1", "=h,h"(i32 %or1) + %or2 = or i32 %res2, 34661 + %res3 = call i32 asm "stepc $0, $1", "=h,h"(i32 %or2) + %or3 = or i32 %res3, 12345678 + call void asm sideeffect "stepd $0", "h"(i32 %or3) + ret void +} + +; Test immediate OR involving low registers. +define void @f18() { +; CHECK-LABEL: f18: +; CHECK: stepa [[REG:%r[0-5]]] +; CHECK: oilh [[REG]], 4660 +; CHECK: stepb [[REG]] +; CHECK: oill [[REG]], 34661 +; CHECK: stepc [[REG]] +; CHECK: oilf [[REG]], 12345678 +; CHECK: stepd [[REG]] +; CHECK: br %r14 + %res1 = call i32 asm "stepa $0", "=r"() + %or1 = or i32 %res1, 305397760 + %res2 = call i32 asm "stepb $0, $1", "=r,r"(i32 %or1) + %or2 = or i32 %res2, 34661 + %res3 = call i32 asm "stepc $0, $1", "=r,r"(i32 %or2) + %or3 = or i32 %res3, 12345678 + call void asm sideeffect "stepd $0", "r"(i32 %or3) + ret void +} |

