Rewrites some simple rules that cause little to no codegen regressions as MIR patterns.
I may have missed some easy cases, but some other rules have intentionally been left as-is because bigger
changes are needed to make them work.
Paths
| Differential D157690
[GlobalISel] Rewrite some simple rules using MIR Patterns ClosedPublic Authored by Pierre-vh on Aug 11 2023, 2:08 AM.
Details Summary Rewrites some simple rules that cause little to no codegen regressions as MIR patterns. I may have missed some easy cases, but some other rules have intentionally been left as-is because bigger
Diff Detail
Event TimelineComment Actions Thanks! These are some really nice examples to study.
Pierre-vh added inline comments.
This revision is now accepted and ready to land.Aug 11 2023, 9:58 AM
This revision now requires changes to proceed.Aug 11 2023, 9:58 AM This revision is now accepted and ready to land.Aug 11 2023, 10:00 AM This revision was landed with ongoing or failed builds.Aug 22 2023, 12:10 AM Closed by commit rG2d87319f06ef: [GlobalISel] Rewrite some simple rules using MIR Patterns (authored by Pierre-vh). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 552236 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-not-really-equiv-insts.mir
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir
|
This 2 was a bug - in G_SELECT $dst, $undef, $x, $y it was picking $x but the comment says "y".