Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit be110d9

Browse files
author
Richard Sandiford
committed
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199115 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 80a3301 commit be110d9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/CodeGen/SystemZ/risbg-01.ll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,12 @@ define i64 @f23(i64 %foo) {
269269
; mask and rotate.
270270
define i32 @f24(i32 %foo) {
271271
; CHECK-LABEL: f24:
272-
; CHECK: nilf %r2, 14
273-
; CHECK: rll %r2, %r2, 3
272+
; CHECK: nilf %r2, 254
273+
; CHECK: rll %r2, %r2, 29
274274
; CHECK: br %r14
275-
%and = and i32 %foo, 14
276-
%parta = shl i32 %and, 3
277-
%partb = lshr i32 %and, 29
275+
%and = and i32 %foo, 254
276+
%parta = lshr i32 %and, 3
277+
%partb = shl i32 %and, 29
278278
%rotl = or i32 %parta, %partb
279279
ret i32 %rotl
280280
}
@@ -295,7 +295,6 @@ define i64 @f25(i64 %foo) {
295295
; This again needs a separate mask and rotate.
296296
define i32 @f26(i32 %foo) {
297297
; CHECK-LABEL: f26:
298-
; CHECK: nill %r2, 65487
299298
; CHECK: rll %r2, %r2, 5
300299
; CHECK: br %r14
301300
%and = and i32 %foo, -49

0 commit comments

Comments
 (0)