[PATCH] D89200: [X86] Add custom type legalization for i64 saddo/ssubo on 32-bit targets. Same for i128 on 64-bit targets.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 00:06:54 PDT 2020
craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, efriedma.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: LLVM.
craig.topper requested review of this revision.
The default type legalization generates multiple compares to check
the overflow condition. But on X86 we can just emit an add/sub with
flags output followed by a adc/sbb and check the overflow flag.
I don't think the bug mentioned in the comment I removed applies
anymore. And if it is an issue I don't see why it wouldn't be
an issue with the expanded code we already get for UADDO/USUBO.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89200
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/known-bits.ll
llvm/test/CodeGen/X86/sadd_sat.ll
llvm/test/CodeGen/X86/sadd_sat_plus.ll
llvm/test/CodeGen/X86/sadd_sat_vec.ll
llvm/test/CodeGen/X86/ssub_sat.ll
llvm/test/CodeGen/X86/ssub_sat_plus.ll
llvm/test/CodeGen/X86/ssub_sat_vec.ll
llvm/test/CodeGen/X86/vec_saddo.ll
llvm/test/CodeGen/X86/vec_ssubo.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89200.297446.patch
Type: text/x-patch
Size: 47118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201011/0fb9d74b/attachment.bin>
More information about the llvm-commits
mailing list