File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
test/Transforms/LICM/AMDGPU Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -781,9 +781,10 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
781781 // cost of the split itself. Count that as 1, to be consistent with
782782 // TLI->getTypeLegalizationCost().
783783 if ((TLI->getTypeAction (Src->getContext (), TLI->getValueType (DL, Src)) ==
784- TargetLowering::TypeSplitVector) ||
785- (TLI->getTypeAction (Dst->getContext (), TLI->getValueType (DL, Dst)) ==
786- TargetLowering::TypeSplitVector)) {
784+ TargetLowering::TypeSplitVector ||
785+ TLI->getTypeAction (Dst->getContext (), TLI->getValueType (DL, Dst)) ==
786+ TargetLowering::TypeSplitVector) &&
787+ Src->getVectorNumElements () > 1 && Dst->getVectorNumElements () > 1 ) {
787788 Type *SplitDst = VectorType::get (Dst->getVectorElementType (),
788789 Dst->getVectorNumElements () / 2 );
789790 Type *SplitSrc = VectorType::get (Src->getVectorElementType (),
Original file line number Diff line number Diff line change 1+ ; RUN: opt -licm -mtriple=amdgcn -S -o - %s | FileCheck %s
2+
3+ ; CHECK-LABEL: foo
4+ ; CHECK: ret
5+ define void @foo (i8* %d , <1 x i32 >* %s , i32 %idx ) {
6+ entry:
7+ br label %for.body
8+
9+ for.body:
10+ %v0 = load <1 x i32 >, <1 x i32 >* %s
11+ %v1 = bitcast <1 x i32 > %v0 to <4 x i8 >
12+ br label %for.cond
13+
14+ for.cond:
15+ %e0 = extractelement <4 x i8 > %v1 , i32 %idx
16+ store i8 %e0 , i8* %d
17+ br i1 false , label %for.exit , label %for.body
18+
19+ for.exit:
20+ ret void
21+ }
Original file line number Diff line number Diff line change 1+ if not ' AMDGPU' in config.root.targets:
2+ config.unsupported = True
You can’t perform that action at this time.
0 commit comments