[PATCH] D141137: [ARM] Fold And/Or into CSel if possible
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 07:14:24 PST 2023
dmgreen created this revision.
dmgreen added reviewers: samtebbs, bipmis, SjoerdMeijer, labrinea.
Herald added subscribers: zzheng, hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.
This is the ARM equivalent of D141119 <https://reviews.llvm.org/D141119>, where we fold `and x, (csel 0, 1, cc)` to `csel ZR, x, cc` if we know that x is 0/1 and for `or x, (csel 0, 1, cc)` emit `csinc x, ZR, cc`. The or pattern gets recognized from a cmov under Arm.
https://reviews.llvm.org/D141137
Files:
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll
llvm/test/CodeGen/Thumb2/csel-andor-onebit.ll
llvm/test/CodeGen/Thumb2/mve-nounrolledremainder.ll
llvm/test/CodeGen/Thumb2/mve-pred-and.ll
llvm/test/CodeGen/Thumb2/mve-pred-or.ll
llvm/test/CodeGen/Thumb2/mve-vcmp.ll
llvm/test/CodeGen/Thumb2/mve-vcmpf.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
llvm/test/CodeGen/Thumb2/mve-vcmpfz.ll
llvm/test/CodeGen/Thumb2/mve-vcmpr.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141137.486856.patch
Type: text/x-patch
Size: 61510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230106/d3b7f3e9/attachment-0001.bin>
More information about the llvm-commits
mailing list