[PATCH] D96767: [DAG] PromoteIntRes_ADDSUBSHLSAT - promote ISD::UADDSAT as clamped add
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 03:05:29 PST 2021
RKSimon created this revision.
RKSimon added reviewers: craig.topper, dmgreen, nikic, lebedev.ri, spatel.
Herald added subscribers: kerbowa, pengfei, hiraditya, nhaehnle, jvesely.
RKSimon requested review of this revision.
Herald added a project: LLVM.
Similar to D96622 <https://reviews.llvm.org/D96622>, we're better off just promoting uaddsat(x,y) -> umin(add(x,y),c) instead of trying to perform a shifted uaddsat.
I initially tried to just use shifted promotion in cases where we didn't have a legal/custom umin - but we don't appear to have any targets that have uaddsat but not umin, so imo we're better off always using the umin and avoid an untested shifted uaddsat code path.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96767
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/AArch64/uadd_sat_vec.ll
llvm/test/CodeGen/AMDGPU/uaddsat.ll
llvm/test/CodeGen/X86/uadd_sat_vec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96767.323941.patch
Type: text/x-patch
Size: 7955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210216/ecb3f9d6/attachment.bin>
More information about the llvm-commits
mailing list