Skip to content

Commit f78b1a4

Browse files
committed
[InstCombine] Add test for #92887 (NFC)
1 parent 558f3ea commit f78b1a4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

llvm/test/Transforms/InstCombine/vec_shuffle.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,3 +2330,19 @@ define <4 x i16> @blend_elements_from_load(ptr align 8 %_0) {
23302330
%rv = shufflevector <3 x i16> <i16 0, i16 undef, i16 undef>, <3 x i16> %load, <4 x i32> <i32 0, i32 1, i32 3, i32 5>
23312331
ret <4 x i16> %rv
23322332
}
2333+
2334+
; FIXME: This is a miscompile.
2335+
define i16 @pr92887(<2 x i16> %v) {
2336+
; CHECK-LABEL: @pr92887(
2337+
; CHECK-NEXT: ret i16 poison
2338+
;
2339+
%v0 = extractelement <2 x i16> %v, i64 0
2340+
%v0lo = and i16 %v0, 1
2341+
%v1 = extractelement <2 x i16> %v, i64 1
2342+
%v1lo = and i16 %v1, 1
2343+
%ins1 = insertelement <4 x i16> poison, i16 %v0lo, i64 0
2344+
%ins2 = insertelement <4 x i16> %ins1, i16 %v1lo, i64 1
2345+
%shuf = shufflevector <4 x i16> %ins2, <4 x i16> <i16 poison, i16 poison, i16 undef, i16 undef>, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
2346+
%extract = extractelement <4 x i16> %shuf, i32 2
2347+
ret i16 %extract
2348+
}

0 commit comments

Comments
 (0)