diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-01-09 11:28:53 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-01-09 11:28:53 +0000 |
commit | db5c1f3d7616cb469374903acdac032469749699 (patch) | |
tree | 8f2e5e703cc0db551bdbf83c0d8423f790bbd78b /test/CodeGen/SystemZ/rosbg-01.ll | |
parent | acb31a245ceef3510f37163e31c0097b0d63cb8f (diff) | |
download | llvm-db5c1f3d7616cb469374903acdac032469749699.tar.gz llvm-db5c1f3d7616cb469374903acdac032469749699.tar.bz2 llvm-db5c1f3d7616cb469374903acdac032469749699.tar.xz |
[SystemZ] Fix RNSBG bug introduced by r197802
The zext handling added in r197802 wasn't right for RNSBG. This patch
restricts it to ROSBG, RXSBG and RISBG. (The tests for RISBG were added
in r197802 since RISBG was the motivating example.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/rosbg-01.ll')
-rw-r--r-- | test/CodeGen/SystemZ/rosbg-01.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/rosbg-01.ll b/test/CodeGen/SystemZ/rosbg-01.ll index 0abacccba1..96ee870d42 100644 --- a/test/CodeGen/SystemZ/rosbg-01.ll +++ b/test/CodeGen/SystemZ/rosbg-01.ll @@ -108,3 +108,14 @@ define i64 @f11(i64 %a, i64 %b) { %or = or i64 %a, %andb ret i64 %or } + +; Check the handling of zext and OR, which can use ROSBG. +define i64 @f12(i64 %a, i32 %b) { +; CHECK-LABEL: f12: +; CHECK: rosbg %r2, %r3, 32, 63, 0 +; CHECK: br %r14 + %add = add i32 %b, 1 + %ext = zext i32 %add to i64 + %or = or i64 %a, %ext + ret i64 %or +} |