https://rise4fun.com/Alive/6bVL
AArch64 is clearly a regression, will need a separate fix
AMDGPU change looks bad either way - bfe is not used
X86 changes look neutral-positive, except vector cases, those are clearly regressions
Paths
| Differential D62100
[DAGCombine][X86][AMDGPU][AArch64] (srl (shl x, c1), c2) with c1 != c2 handling AbandonedPublic Authored by lebedev.ri on May 18 2019, 6:24 AM.
Details
Summary https://rise4fun.com/Alive/6bVL AArch64 is clearly a regression, will need a separate fix
Diff Detail
Event TimelineHerald added subscribers: kristof.beyls, t-tye, tpr and 7 others. · View Herald TranscriptMay 18 2019, 6:24 AM Comment Actions Looked at changes:
Comment Actions Looks like AMDGPU changes are neutral too.
lebedev.ri added inline comments.
lebedev.ri marked an inline comment as done. lebedev.ri added inline comments.
Revision Contents
Diff 200150 lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AArch64/arm64-bitfield-extract.ll
test/CodeGen/AMDGPU/llvm.amdgcn.ubfe.ll
test/CodeGen/X86/pr32588.ll
test/CodeGen/X86/pull-binop-through-shift.ll
test/CodeGen/X86/rotate-extract-vector.ll
test/CodeGen/X86/rotate-extract.ll
test/CodeGen/X86/shift-mask.ll
|
After actually looking at -debug output, this regression happens because of SimplifyDemandedBits(),
which ignores AArch64TargetLowering::isDesirableToCommuteWithShift() override.
So when we get to AArch64TargetLowering::isBitfieldExtractOp(), we have
I'm not sure how to turn this pattern on it's head to produce ubfx again.