[PATCH] D118635: [GlobalISel] Combine: (G_*MULO x, 0) -> 0 + no carry out
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 10:55:17 PST 2022
paquette created this revision.
paquette added reviewers: arsenm, foad, jroelofs.
Herald added subscribers: steven.zhang, hiraditya, rovka.
paquette requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
Similar to the following combine in `DAGCombiner::visitMULO`:
// fold (mulo x, 0) -> 0 + no carry out
if (isNullOrNullSplat(N1))
return CombineTo(N, DAG.getConstant(0, DL, VT),
DAG.getConstant(0, DL, CarryVT));
This fixes some generally poor codegen for `*mulo`:
https://godbolt.org/z/eTxYsvz8f
https://reviews.llvm.org/D118635
Files:
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/prelegalizer-combiner-mulo-zero.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118635.404615.patch
Type: text/x-patch
Size: 8524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/8d2d1044/attachment.bin>
More information about the llvm-commits
mailing list