This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Combine `undef / X -> 0` and `undef % X -> 0`
ClosedPublic

Authored by paquette on Oct 1 2022, 1:42 PM.

Details

Summary

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.

Diff Detail

Event Timeline

paquette created this revision.Oct 1 2022, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2022, 1:42 PM
paquette requested review of this revision.Oct 1 2022, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2022, 1:42 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm accepted this revision.Oct 1 2022, 1:48 PM
This revision is now accepted and ready to land.Oct 1 2022, 1:48 PM
This revision was landed with ongoing or failed builds.Oct 1 2022, 1:49 PM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/AArch64/GlobalISel/combine-binop-undef-left-to-zero.mir