[PATCH] D124530: [X86] Fix gather/scatter with large scales (PR55021)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 08:22:56 PDT 2022


nikic created this revision.
nikic added reviewers: pengfei, craig.topper, RKSimon.
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.

The AVX512 gather/scatter instructions only support scales up to 8. If the scale is larger, perform an explicit shift operation instead.

I'm not familiar with the requirements for the instruction -- is a scale that does not match the scatter element width actually supported? The instruction looks sensible, but I don't know if this is actually legal. If not, the check could be change to compare with the element width.

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


https://reviews.llvm.org/D124530

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/gather-scatter-opaque-ptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124530.425527.patch
Type: text/x-patch
Size: 9736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220427/cfb58265/attachment.bin>


More information about the llvm-commits mailing list