[X86][SSE] Enable SMIN/SMAX/UMIN/UMAX custom lowering for all legal types
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Feb 2018 10:52:37 +0000 (10:52 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 11 Feb 2018 10:52:37 +0000 (10:52 +0000)
commit0be5567a891c192582ea87d67b58f18f00dcf038
treea27f38c984d237bdb85019bed0ff7b62f1273485
parent91e2b9d081829af95a7b84ec5393e33539e9130e
[X86][SSE] Enable SMIN/SMAX/UMIN/UMAX custom lowering for all legal types

This allows us to recognise more saturation patterns and also simplify some MINMAX codegen that was failing to combine CMPGE comparisons to a legal CMPGT.

Differential Revision: https://reviews.llvm.org/D43014

llvm-svn: 324837
18 files changed:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-smax.ll
llvm/test/CodeGen/X86/combine-smin.ll
llvm/test/CodeGen/X86/combine-umax.ll
llvm/test/CodeGen/X86/combine-umin.ll
llvm/test/CodeGen/X86/horizontal-reduce-smax.ll
llvm/test/CodeGen/X86/horizontal-reduce-smin.ll
llvm/test/CodeGen/X86/horizontal-reduce-umax.ll
llvm/test/CodeGen/X86/horizontal-reduce-umin.ll
llvm/test/CodeGen/X86/i64-to-float.ll
llvm/test/CodeGen/X86/psubus.ll
llvm/test/CodeGen/X86/vec_minmax_sint.ll
llvm/test/CodeGen/X86/vec_minmax_uint.ll
llvm/test/CodeGen/X86/vector-trunc-packus.ll
llvm/test/CodeGen/X86/vector-trunc-ssat.ll
llvm/test/CodeGen/X86/vector-trunc-usat.ll
llvm/test/CodeGen/X86/vselect-minmax.ll