[PATCH] D135020: [GlobalISel] Combine `undef / X -> 0` and `undef % X -> 0`

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 1 13:42:07 PDT 2022


paquette created this revision.
paquette added reviewers: aemerson, jroelofs, arsenm.
Herald added subscribers: steven.zhang, rovka.
Herald added a project: All.
paquette requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This fixes the `urem_undef_lhs` case in the following:

https://gcc.godbolt.org/z/Wo9x7o679

Also see https://github.com/llvm/llvm-project/issues/57256 for more related bugs.

This is equivalent to the undef bits in `simplifyDivRem` in the DAGCombiner.


https://reviews.llvm.org/D135020

Files:
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/test/CodeGen/AArch64/GlobalISel/combine-binop-undef-left-to-zero.mir
  llvm/test/CodeGen/AArch64/GlobalISel/combine-shl.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135020.464518.patch
Type: text/x-patch
Size: 5212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221001/4553d6a7/attachment.bin>


More information about the llvm-commits mailing list