[PATCH] D74170: AMDGPU/GlobalISel: Don't mis-select vector index on a constant

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 14:25:55 PST 2020


arsenm created this revision.
arsenm added reviewers: kerbowa, nhaehnle.
Herald added subscribers: Petar.Avramovic, arphaman, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

Vector indexing with a constant index should be folded out in the
legalizer, but this was accidentally falling through. This would
produce the indexing operation with $noreg. Handle this case as a
dynamic index just in of a future bug like this happens again.


https://reviews.llvm.org/D74170

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-extract-vector-elt.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert-vector-elt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74170.243006.patch
Type: text/x-patch
Size: 6864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/3cf92cc5/attachment.bin>


More information about the llvm-commits mailing list