[PATCH] D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 11:10:48 PDT 2022


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: foad, sebastian-ne, mbrkusanin, arsenm, aemerson, paquette.
Herald added subscribers: kosarev, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
Petar.Avramovic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Caused by legacy min/max combines (select + cmp) asking for legalizer info in prelegalizer (D135047 <https://reviews.llvm.org/D135047> added combine to all_combines).
Combine still does not work for AMDGPU since destination opcode is custom, not legal. Similar combine works on DAG since it asks for legal or custom.


https://reviews.llvm.org/D137274

Files:
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/select-to-fmin-fmax.ll
  llvm/test/CodeGen/AMDGPU/cttz_zero_undef.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137274.472703.patch
Type: text/x-patch
Size: 9081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221102/5e61f724/attachment.bin>


More information about the llvm-commits mailing list