Reapply "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"
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. Reapplying with updated SLPVectorizer tests. Differential Revision: https://reviews.llvm.org/D56636 llvm-svn: 351219
Showing
- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp 12 additions, 0 deletionsllvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp 16 additions, 4 deletionsllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
- llvm/lib/Target/X86/X86TargetTransformInfo.cpp 7 additions, 0 deletionsllvm/lib/Target/X86/X86TargetTransformInfo.cpp
- llvm/test/Analysis/CostModel/X86/arith-usat.ll 70 additions, 51 deletionsllvm/test/Analysis/CostModel/X86/arith-usat.ll
- llvm/test/CodeGen/X86/usub_sat.ll 9 additions, 31 deletionsllvm/test/CodeGen/X86/usub_sat.ll
- llvm/test/CodeGen/X86/usub_sat_vec.ll 664 additions, 1565 deletionsllvm/test/CodeGen/X86/usub_sat_vec.ll
- llvm/test/Transforms/SLPVectorizer/X86/arith-sub-usat.ll 260 additions, 100 deletionsllvm/test/Transforms/SLPVectorizer/X86/arith-sub-usat.ll
Loading
Please register or sign in to comment