[PATCH] D105827: [SLP]Workaround for InsertSubVector cost.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 14:19:46 PDT 2021
lebedev.ri added a comment.
In D105827#2881468 <https://reviews.llvm.org/D105827#2881468>, @ABataev wrote:
> In D105827#2880704 <https://reviews.llvm.org/D105827#2880704>, @aeubanks wrote:
>
>> This is causing hangs
>> `$ clang++ -O2 -c reduced2.ll -o /dev/null`
>> F17952182: reduced2.ll <https://reviews.llvm.org/F17952182>
>
> Investigated it, actually hangs in `X86 DAG->DAG Instruction Selection on function (_ZN12SpinningCube6UpdateEv)` even without SLP vectorizer with the attached reproducer (hangs with 12.0.0 and trunk, 11.0.1 does not recognize `poison` but passes if I replace `poison` by `undef`. 12.0.0 and trunk still hangs even in this case). Command to reproduce is `llc reduced.ll -o /dev/null`. Looks like the bug was introduced somewhat between llvm 11 and 12. Hangs in the loop in lines 1523-1598, `lib/CodeGen/SelectionDAG/DAGCombiner.cpp` F17954903: reduced.ll <https://reviews.llvm.org/F17954903>
Looks like endless X86 shuffle combine loop
Legalizing: t89: v4f32 = X86ISD::SHUFP t87, t80, TargetConstant:i8<36>
Legal node: nothing to do
Combining: t89: v4f32 = X86ISD::SHUFP t87, t80, TargetConstant:i8<36>
Creating fp constant: t87: v4f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
Creating fp constant: t87: v4f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
Creating new node: t1580: v4f32 = undef
Creating fp constant: t87: v4f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
Creating new node: t1581: v4f32 = X86ISD::UNPCKL t68, undef:v4f32
Replacing.2 t1578: v4f32 = X86ISD::SHUFP t87, t68, TargetConstant:i8<-44>
With: t1581: v4f32 = X86ISD::UNPCKL t68, undef:v4f32
Legalizing: t1581: v4f32 = X86ISD::UNPCKL t68, undef:v4f32
Legal node: nothing to do
Combining: t1581: v4f32 = X86ISD::UNPCKL t68, undef:v4f32
Creating fp constant: t87: v4f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
Creating constant: t1582: i8 = TargetConstant<-44>
Creating new node: t1583: v4f32 = X86ISD::SHUFP t87, t68, TargetConstant:i8<-44>
... into: t1583: v4f32 = X86ISD::SHUFP t87, t68, TargetConstant:i8<-44>
Legalizing: t1583: v4f32 = X86ISD::SHUFP t87, t68, TargetConstant:i8<-44>
Legal node: nothing to do
Combining: t1583: v4f32 = X86ISD::SHUFP t87, t68, TargetConstant:i8<-44>
Creating new node: t1584: v4f32 = undef
Creating fp constant: t87: v4f32 = BUILD_VECTOR ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>, ConstantFP:f32<0.000000e+00>
Legalizing: t1582: i8 = TargetConstant<-44>
Combining: t1582: i8 = TargetConstant<-44>
Legalizing: t89: v4f32 = X86ISD::SHUFP t87, t80, TargetConstant:i8<36>
Legal node: nothing to do
Combining: t89: v4f32 = X86ISD::SHUFP t87, t80, TargetConstant:i8<36>
<here we go again>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105827/new/
https://reviews.llvm.org/D105827
More information about the llvm-commits
mailing list