Skip to content

Commit ab1d988

Browse files
committed
[InstCombine] Add test for incorrect fshr transform (#89338)
1 parent b64c69d commit ab1d988

File tree

1 file changed

+10
-0
lines changed
  • llvm/test/Transforms/InstCombine

1 file changed

+10
-0
lines changed

llvm/test/Transforms/InstCombine/fsh.ll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,3 +1001,13 @@ define <2 x i32> @fsh_unary_shuffle_ops_partial_widening(<3 x i32> %x, <2 x i32>
10011001
%r = call <2 x i32> @llvm.fshr.v2i32(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c)
10021002
ret <2 x i32> %r
10031003
}
1004+
1005+
; FIXME: This is a miscompile.
1006+
define <2 x i32> @fshr_vec_zero_elem(<2 x i32> %x, <2 x i32> %y) {
1007+
; CHECK-LABEL: @fshr_vec_zero_elem(
1008+
; CHECK-NEXT: [[FSH:%.*]] = call <2 x i32> @llvm.fshl.v2i32(<2 x i32> [[X:%.*]], <2 x i32> [[Y:%.*]], <2 x i32> <i32 30, i32 0>)
1009+
; CHECK-NEXT: ret <2 x i32> [[FSH]]
1010+
;
1011+
%fsh = call <2 x i32> @llvm.fshr.v2i32(<2 x i32> %x, <2 x i32> %y, <2 x i32> <i32 2, i32 0>)
1012+
ret <2 x i32> %fsh
1013+
}

0 commit comments

Comments
 (0)