If the index operand for a gather/scatter intrinsic is being scaled (self-addition or a shl-by-immediate) then we may be able to fold that scaling into the intrinsic scale immediate value instead.
Fixes PR13310.
Paths
| Differential D108539
[X86][AVX] Attempt to fold a scaled index into a gather/scatter scale immediate (PR13310) ClosedPublic Authored by RKSimon on Aug 23 2021, 4:02 AM.
Details Summary If the index operand for a gather/scatter intrinsic is being scaled (self-addition or a shl-by-immediate) then we may be able to fold that scaling into the intrinsic scale immediate value instead. Fixes PR13310.
Diff Detail
Unit TestsFailed Event Timeline
This revision is now accepted and ready to land.Oct 28 2021, 5:55 AM Closed by commit rGd29ccbecd093: [X86][AVX] Attempt to fold a scaled index into a gather/scatter scale immediate… (authored by RKSimon). · Explain WhyOct 28 2021, 6:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 382670 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/masked_gather_scatter.ll
|
Does the Index element size need to be pointer width for this to be legal? The implicit sign extend is applied before the scale.