[SelectionDAG] Improve expansion of wide min/max
authorEli Friedman <efriedma@quicinc.com>
Wed, 24 May 2023 17:39:43 +0000 (10:39 -0700)
committerEli Friedman <efriedma@quicinc.com>
Mon, 26 Jun 2023 17:45:41 +0000 (10:45 -0700)
commitbc7f11ccb01cbc2ae6c1631535ea5c181f70cb1e
tree681014141fe9f96333359c88f81194b473e23213
parenta1540e4852a90e7f72c996a3832edfd20968bd9e
[SelectionDAG] Improve expansion of wide min/max

The current implementation tries to handle the high and low halves
separately, but that's less efficient in most cases; use a wide SETCC
instead.

Differential Revision: https://reviews.llvm.org/D151358
32 files changed:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
llvm/test/CodeGen/AArch64/fpclamptosat.ll
llvm/test/CodeGen/AArch64/fpclamptosat_vec.ll
llvm/test/CodeGen/AArch64/vecreduce-umax-legalization.ll
llvm/test/CodeGen/AMDGPU/max.ll
llvm/test/CodeGen/AMDGPU/min.ll
llvm/test/CodeGen/ARM/fpclamptosat.ll
llvm/test/CodeGen/ARM/fpclamptosat_vec.ll
llvm/test/CodeGen/RISCV/fpclamptosat.ll
llvm/test/CodeGen/RISCV/min-max.ll
llvm/test/CodeGen/RISCV/rv32zbb.ll
llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll
llvm/test/CodeGen/Thumb2/mve-fpclamptosat_vec.ll
llvm/test/CodeGen/Thumb2/mve-minmaxi.ll
llvm/test/CodeGen/Thumb2/mve-vmaxv-vminv-scalar.ll
llvm/test/CodeGen/VE/Scalar/smax.ll
llvm/test/CodeGen/VE/Scalar/smin.ll
llvm/test/CodeGen/VE/Scalar/umax.ll
llvm/test/CodeGen/VE/Scalar/umin.ll
llvm/test/CodeGen/WebAssembly/fpclamptosat.ll
llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll
llvm/test/CodeGen/X86/abds.ll
llvm/test/CodeGen/X86/abdu.ll
llvm/test/CodeGen/X86/fpclamptosat.ll
llvm/test/CodeGen/X86/fpclamptosat_vec.ll
llvm/test/CodeGen/X86/sdiv_fix_sat.ll
llvm/test/CodeGen/X86/smax.ll
llvm/test/CodeGen/X86/smin.ll
llvm/test/CodeGen/X86/udiv_fix_sat.ll
llvm/test/CodeGen/X86/umax.ll
llvm/test/CodeGen/X86/umin.ll