Skip to content

Commit e7435e6

Browse files
committed
[X86] Add test case for Issue #55157
1 parent e9b4f22 commit e7435e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

llvm/test/CodeGen/X86/vector-shuffle-combining.ll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,6 +3333,21 @@ define void @PR45604(<32 x i16>* %dst, <8 x i16>* %src) {
33333333
ret void
33343334
}
33353335

3336+
; FIXME: getFauxShuffle AND/ANDN decoding wrongly assumes an undef src always gives an undef dst.
3337+
define <2 x i64> @PR55157(<16 x i8>* %0) {
3338+
; CHECK-LABEL: PR55157:
3339+
; CHECK: # %bb.0:
3340+
; CHECK-NEXT: retq
3341+
%2 = load <16 x i8>, <16 x i8>* %0, align 16
3342+
%3 = icmp eq <16 x i8> %2, zeroinitializer
3343+
%4 = tail call <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8> zeroinitializer, <16 x i8> zeroinitializer)
3344+
%5 = select <16 x i1> %3, <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i8> %4
3345+
%6 = shufflevector <16 x i8> %5, <16 x i8> poison, <16 x i32> <i32 8, i32 8, i32 9, i32 9, i32 10, i32 10, i32 11, i32 11, i32 12, i32 12, i32 13, i32 13, i32 14, i32 14, i32 15, i32 15>
3346+
%7 = bitcast <16 x i8> %6 to <2 x i64>
3347+
ret <2 x i64> %7
3348+
}
3349+
declare <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8>, <16 x i8>)
3350+
33363351
; Test case reported on D105827
33373352
define void @SpinningCube() {
33383353
; SSE2-LABEL: SpinningCube:

0 commit comments

Comments
 (0)