[PATCH] D92102: [DAG] Legalize abs(x) -> umin(x,sub(0,x)) iff umin/sub are legal
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 07:40:06 PST 2020
RKSimon created this revision.
RKSimon added reviewers: spatel, lebedev.ri.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: LLVM.
RKSimon requested review of this revision.
If umin() is legal, this is likely to result in smaller codegen expansion for abs(x) than the xor(add,ashr) method.
Followup to D92095 <https://reviews.llvm.org/D92095>
Alive2: https://alive2.llvm.org/ce/z/8nuX6s
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92102
Files:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/abs.ll
llvm/test/CodeGen/X86/combine-abs.ll
llvm/test/CodeGen/X86/viabs.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92102.307612.patch
Type: text/x-patch
Size: 4071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201125/cffedc30/attachment.bin>
More information about the llvm-commits
mailing list