summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-13 15:40:25 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-01-13 15:40:25 +0000
commit64c0c4c0158275b35567095fb39f872f935ccb14 (patch)
tree2110eca893a1812d99fa3fdf29b434631579cc35
parent32379b814138b3e7c66c64775912948462c305b4 (diff)
downloadbcm5719-llvm-64c0c4c0158275b35567095fb39f872f935ccb14.tar.gz
bcm5719-llvm-64c0c4c0158275b35567095fb39f872f935ccb14.zip
[SystemZ] Improve risbg-01.ll test
The old mask in f24 wasn't well chosen because the lshr would always be zero. CodeGen didn't detect this but InstCombine would. The new mask ensures that both shifts are needed. f26 is specifically testing for a wrap-around mask. The AND can be applied to just the shift left, either before or after the shift. Again, CodeGen kept it in the original form but InstCombine would mask after the shift instead. The exact choice of NILF isn't important for the test so I just dropped it and kept the rotate. llvm-svn: 199115
-rw-r--r--llvm/test/CodeGen/SystemZ/risbg-01.ll11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/SystemZ/risbg-01.ll b/llvm/test/CodeGen/SystemZ/risbg-01.ll
index e303067e539..d75e8e4b11a 100644
--- a/llvm/test/CodeGen/SystemZ/risbg-01.ll
+++ b/llvm/test/CodeGen/SystemZ/risbg-01.ll
@@ -269,12 +269,12 @@ define i64 @f23(i64 %foo) {
; mask and rotate.
define i32 @f24(i32 %foo) {
; CHECK-LABEL: f24:
-; CHECK: nilf %r2, 14
-; CHECK: rll %r2, %r2, 3
+; CHECK: nilf %r2, 254
+; CHECK: rll %r2, %r2, 29
; CHECK: br %r14
- %and = and i32 %foo, 14
- %parta = shl i32 %and, 3
- %partb = lshr i32 %and, 29
+ %and = and i32 %foo, 254
+ %parta = lshr i32 %and, 3
+ %partb = shl i32 %and, 29
%rotl = or i32 %parta, %partb
ret i32 %rotl
}
@@ -295,7 +295,6 @@ define i64 @f25(i64 %foo) {
; This again needs a separate mask and rotate.
define i32 @f26(i32 %foo) {
; CHECK-LABEL: f26:
-; CHECK: nill %r2, 65487
; CHECK: rll %r2, %r2, 5
; CHECK: br %r14
%and = and i32 %foo, -49
OpenPOWER on IntegriCloud