[PATCH] D56636: [CodeGen][X86] Expand vector USUBSAT to UMAX+SUB
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 12 04:13:06 PST 2019
nikic created this revision.
nikic added reviewers: RKSimon, spatel.
Herald added a subscriber: llvm-commits.
Related to https://bugs.llvm.org/show_bug.cgi?id=40123.
Rather than scalarizing, expand a vector USUBSAT into UMAX+SUB, which produces much better code for X86. I've updated the cost tables on the assumption that pmaxud has a cost of 1, not sure if that's correct. Agner lists it as latency 1, and recip throughput 0.5 or 1 depending on uarch.
Repository:
rL LLVM
https://reviews.llvm.org/D56636
Files:
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86TargetTransformInfo.cpp
test/Analysis/CostModel/X86/arith-usat.ll
test/CodeGen/X86/usub_sat_vec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56636.181438.patch
Type: text/x-patch
Size: 61371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190112/f5e435d6/attachment.bin>
More information about the llvm-commits
mailing list