Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/SLPVectorizer/X86/bad_types.ll
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | bb1: ; preds = %entry | ||||
%r = zext i2 %p2 to i8 | %r = zext i2 %p2 to i8 | ||||
ret i8 %r | ret i8 %r | ||||
} | } | ||||
declare void @f(i64, i64) | declare void @f(i64, i64) | ||||
define void @test4(i32 %a, i28* %ptr) { | define void @test4(i32 %a, i28* %ptr) { | ||||
; Check that we do not vectorize types that are padded to a bigger ones. | ; Check that we do not vectorize types that are padded to a bigger ones. | ||||
; FIXME: This is not correct! See D94446. | |||||
; | ; | ||||
; CHECK-LABEL: @test4( | ; CHECK-LABEL: @test4( | ||||
; CHECK-NEXT: entry: | ; CHECK-NEXT: entry: | ||||
; CHECK-NEXT: [[TRUNC:%.*]] = trunc i32 [[A:%.*]] to i28 | ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i32 [[A:%.*]] to i28 | ||||
; CHECK-NEXT: [[GEP1:%.*]] = getelementptr i28, i28* [[PTR:%.*]], i32 1 | ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr i28, i28* [[PTR:%.*]], i32 1 | ||||
; CHECK-NEXT: [[GEP2:%.*]] = getelementptr i28, i28* [[PTR]], i32 2 | ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr i28, i28* [[PTR]], i32 2 | ||||
; CHECK-NEXT: [[GEP3:%.*]] = getelementptr i28, i28* [[PTR]], i32 3 | ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr i28, i28* [[PTR]], i32 3 | ||||
; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x i28> poison, i28 [[TRUNC]], i32 0 | ; CHECK-NEXT: store i28 [[TRUNC]], i28* [[PTR]], align 4 | ||||
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x i28> [[TMP0]], i28 [[TRUNC]], i32 1 | ; CHECK-NEXT: store i28 [[TRUNC]], i28* [[GEP1]], align 4 | ||||
; CHECK-NEXT: [[TMP2:%.*]] = insertelement <4 x i28> [[TMP1]], i28 [[TRUNC]], i32 2 | ; CHECK-NEXT: store i28 [[TRUNC]], i28* [[GEP2]], align 4 | ||||
; CHECK-NEXT: [[TMP3:%.*]] = insertelement <4 x i28> [[TMP2]], i28 [[TRUNC]], i32 3 | ; CHECK-NEXT: store i28 [[TRUNC]], i28* [[GEP3]], align 4 | ||||
; CHECK-NEXT: [[TMP4:%.*]] = bitcast i28* [[PTR]] to <4 x i28>* | |||||
; CHECK-NEXT: store <4 x i28> [[TMP3]], <4 x i28>* [[TMP4]], align 4 | |||||
; CHECK-NEXT: ret void | ; CHECK-NEXT: ret void | ||||
; | ; | ||||
entry: | entry: | ||||
%trunc = trunc i32 %a to i28 | %trunc = trunc i32 %a to i28 | ||||
%gep1 = getelementptr i28, i28* %ptr, i32 1 | %gep1 = getelementptr i28, i28* %ptr, i32 1 | ||||
%gep2 = getelementptr i28, i28* %ptr, i32 2 | %gep2 = getelementptr i28, i28* %ptr, i32 2 | ||||
%gep3 = getelementptr i28, i28* %ptr, i32 3 | %gep3 = getelementptr i28, i28* %ptr, i32 3 | ||||
store i28 %trunc, i28* %ptr | store i28 %trunc, i28* %ptr | ||||
store i28 %trunc, i28* %gep1 | store i28 %trunc, i28* %gep1 | ||||
store i28 %trunc, i28* %gep2 | store i28 %trunc, i28* %gep2 | ||||
store i28 %trunc, i28* %gep3 | store i28 %trunc, i28* %gep3 | ||||
ret void | ret void | ||||
} | } |