1,172 changes: 586 additions & 586 deletions llvm/test/CodeGen/X86/subvector-broadcast.ll

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions llvm/test/Transforms/InstCombine/vscale_insertelement.ll
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,20 @@ define <vscale x 4 x float> @insertelement_sequene_may_not_be_splat(float %x) {
%t3 = insertelement <vscale x 4 x float> %t2, float %x, i32 3
ret <vscale x 4 x float> %t3
}

; OSS-Fuzz #27416
; https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27416
define void @ossfuzz_27416(i32 %v) {
; CHECK-LABEL: @ossfuzz_27416(
; CHECK-NEXT: [[IN:%.*]] = insertelement <vscale x 4 x i32> undef, i32 [[V:%.*]], i32 0
; CHECK-NEXT: [[SPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[IN]], <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
; CHECK-NEXT: [[I1:%.*]] = insertelement <vscale x 4 x i32> [[SPLAT]], i32 undef, i8 -128
; CHECK-NEXT: store <vscale x 4 x i32> [[I1]], <vscale x 4 x i32>* undef, align 16
; CHECK-NEXT: ret void
;
%in = insertelement <vscale x 4 x i32> undef, i32 %v, i32 0
%splat = shufflevector <vscale x 4 x i32> %in, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
%I1 = insertelement <vscale x 4 x i32> %splat, i32 undef, i8 -128
store <vscale x 4 x i32> %I1, <vscale x 4 x i32>* undef, align 16
ret void
}