Skip to content

Commit

Permalink
[test] Fix CodeGen/VE/Scalar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Mar 2, 2021
1 parent 5b333d3 commit 1e46b6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
18 changes: 6 additions & 12 deletions llvm/test/CodeGen/VE/Scalar/bitreverse.ll
Original file line number Diff line number Diff line change
Expand Up @@ -49,39 +49,33 @@ define zeroext i32 @func32z(i32 zeroext %p) {
define signext i16 @func16s(i16 signext %p) {
; CHECK-LABEL: func16s:
; CHECK: # %bb.0:
; CHECK-NEXT: brv %s0, %s0
; CHECK-NEXT: sra.l %s0, %s0, 48
; CHECK-NEXT: b.l.t (, %s10)
; CHECK-NEXT: bswp %s0, %s0, 1
; CHECK-NEXT: and %s0, %s0, (32)0
; CHECK-NEXT: srl %s1, %s0, 12
%r = tail call i16 @llvm.bitreverse.i16(i16 %p)
ret i16 %r
}

define zeroext i16 @func16z(i16 zeroext %p) {
; CHECK-LABEL: func16z:
; CHECK: # %bb.0:
; CHECK-NEXT: brv %s0, %s0
; CHECK-NEXT: srl %s0, %s0, 48
; CHECK-NEXT: b.l.t (, %s10)
; CHECK-NEXT: bswp %s0, %s0, 1
; CHECK-NEXT: and %s0, %s0, (32)0
; CHECK-NEXT: srl %s1, %s0, 12
%r = tail call i16 @llvm.bitreverse.i16(i16 %p)
ret i16 %r
}

define signext i8 @func8s(i8 signext %p) {
; CHECK-LABEL: func8s:
; CHECK: # %bb.0:
; CHECK-NEXT: brv %s0, %s0
; CHECK-NEXT: sra.l %s0, %s0, 56
; CHECK-NEXT: b.l.t (, %s10)
%r = tail call i8 @llvm.bitreverse.i8(i8 %p)
ret i8 %r
}

define zeroext i8 @func8z(i8 zeroext %p) {
; CHECK-LABEL: func8z:
; CHECK: # %bb.0:
; CHECK-NEXT: brv %s0, %s0
; CHECK-NEXT: srl %s0, %s0, 56
; CHECK-NEXT: b.l.t (, %s10)
%r = tail call i8 @llvm.bitreverse.i8(i8 %p)
ret i8 %r
}
Expand Down
6 changes: 2 additions & 4 deletions llvm/test/CodeGen/VE/Scalar/rem.ll
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ define signext i16 @remi16(i16 signext %a, i16 signext %b) {
; CHECK-NEXT: divs.w.sx %s2, %s0, %s1
; CHECK-NEXT: muls.w.sx %s1, %s2, %s1
; CHECK-NEXT: subs.w.sx %s0, %s0, %s1
; CHECK-NEXT: sll %s0, %s0, 48
; CHECK-NEXT: sra.l %s0, %s0, 48
; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
; CHECK-NEXT: b.l.t (, %s10)
%a32 = sext i16 %a to i32
%b32 = sext i16 %b to i32
Expand Down Expand Up @@ -113,8 +112,7 @@ define signext i8 @remi8(i8 signext %a, i8 signext %b) {
; CHECK-NEXT: divs.w.sx %s2, %s0, %s1
; CHECK-NEXT: muls.w.sx %s1, %s2, %s1
; CHECK-NEXT: subs.w.sx %s0, %s0, %s1
; CHECK-NEXT: sll %s0, %s0, 56
; CHECK-NEXT: sra.l %s0, %s0, 56
; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
; CHECK-NEXT: b.l.t (, %s10)
%a32 = sext i8 %a to i32
%b32 = sext i8 %b to i32
Expand Down

0 comments on commit 1e46b6f

Please sign in to comment.