[PATCH] D124605: [SelectionDAGBuilder] Don't create MGATHER/MSCATTER with Scale != ElemSize

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 03:33:50 PDT 2022


nikic created this revision.
nikic added reviewers: pengfei, craig.topper, RKSimon, gpei, paulwalker-arm.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is an alternative to D124530 <https://reviews.llvm.org/D124530>. In getUniformBase() only create scales that match the gather/scatter element size. If targets also support other scales, then they can produce those scales in DAG combines. This is what X86 already does (as long as the resulting scale would be 1, 2, 4 or 8).

This essentially restores the pre-opaque-pointer state of things.

Fixes https://github.com/llvm/llvm-project/issues/55021.


https://reviews.llvm.org/D124605

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/test/CodeGen/X86/gather-scatter-opaque-ptr-2.ll
  llvm/test/CodeGen/X86/gather-scatter-opaque-ptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124605.425740.patch
Type: text/x-patch
Size: 13714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220428/4b523516/attachment.bin>


More information about the llvm-commits mailing list