Skip to content

Commit ade7ae4

Browse files
committed
[InstSimplify] Add test for #77320 (NFC)
1 parent b4ee7d6 commit ade7ae4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llvm/test/Transforms/InstSimplify/select.ll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,3 +1733,17 @@ define i8 @select_or_disjoint_eq(i8 %x, i8 %y) {
17331733
%sel = select i1 %cmp, i8 %x, i8 %or
17341734
ret i8 %sel
17351735
}
1736+
1737+
; FIXME: This is a miscompile.
1738+
define <4 x i32> @select_vector_cmp_with_bitcasts(<2 x i64> %x, <4 x i32> %y) {
1739+
; CHECK-LABEL: @select_vector_cmp_with_bitcasts(
1740+
; CHECK-NEXT: ret <4 x i32> zeroinitializer
1741+
;
1742+
%x.bc = bitcast <2 x i64> %x to <4 x i32>
1743+
%y.bc = bitcast <4 x i32> %y to <2 x i64>
1744+
%sub = sub <2 x i64> %x, %y.bc
1745+
%sub.bc = bitcast <2 x i64> %sub to <4 x i32>
1746+
%cmp = icmp eq <4 x i32> %y, %x.bc
1747+
%sel = select <4 x i1> %cmp, <4 x i32> %sub.bc, <4 x i32> zeroinitializer
1748+
ret <4 x i32> %sel
1749+
}

0 commit comments

Comments
 (0)