[all-commits] [llvm/llvm-project] a266af: [InstCombine] Canonicalize SPF to min/max intrinsics

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Feb 24 00:09:16 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a266af721153fab6452094207b09ed265ab0be7b
      https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-24 (Thu, 24 Feb 2022)

  Changed paths:
    M clang/test/CodeGen/builtins-wasm.c
    M clang/test/Headers/wasm.c
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll
    M llvm/test/Transforms/Coroutines/coro-retcon-once-value.ll
    M llvm/test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll
    M llvm/test/Transforms/InstCombine/CPP_min_max.ll
    M llvm/test/Transforms/InstCombine/abs-1.ll
    M llvm/test/Transforms/InstCombine/adjust-for-minmax.ll
    M llvm/test/Transforms/InstCombine/canonicalize-clamp-with-select-of-constant-threshold-pattern.ll
    M llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
    M llvm/test/Transforms/InstCombine/div-shift.ll
    M llvm/test/Transforms/InstCombine/icmp-add.ll
    M llvm/test/Transforms/InstCombine/icmp-dom.ll
    M llvm/test/Transforms/InstCombine/icmp.ll
    M llvm/test/Transforms/InstCombine/max-of-nots.ll
    M llvm/test/Transforms/InstCombine/max_known_bits.ll
    M llvm/test/Transforms/InstCombine/min-positive.ll
    M llvm/test/Transforms/InstCombine/minmax-demandbits.ll
    M llvm/test/Transforms/InstCombine/minmax-fold.ll
    M llvm/test/Transforms/InstCombine/minmax-fp.ll
    M llvm/test/Transforms/InstCombine/minmax-of-minmax.ll
    M llvm/test/Transforms/InstCombine/pr21199.ll
    M llvm/test/Transforms/InstCombine/pr27236.ll
    M llvm/test/Transforms/InstCombine/pr38897.ll
    M llvm/test/Transforms/InstCombine/pr38915.ll
    M llvm/test/Transforms/InstCombine/pr44541.ll
    M llvm/test/Transforms/InstCombine/pr44835.ll
    M llvm/test/Transforms/InstCombine/preserve-sminmax.ll
    M llvm/test/Transforms/InstCombine/sadd_sat.ll
    M llvm/test/Transforms/InstCombine/saturating-add-sub.ll
    M llvm/test/Transforms/InstCombine/select-gep.ll
    M llvm/test/Transforms/InstCombine/select-imm-canon.ll
    M llvm/test/Transforms/InstCombine/select-min-max.ll
    M llvm/test/Transforms/InstCombine/select-pr39595.ll
    M llvm/test/Transforms/InstCombine/select.ll
    M llvm/test/Transforms/InstCombine/select_meta.ll
    M llvm/test/Transforms/InstCombine/sext.ll
    M llvm/test/Transforms/InstCombine/smax-icmp.ll
    M llvm/test/Transforms/InstCombine/smin-icmp.ll
    M llvm/test/Transforms/InstCombine/sub-ashr-or-to-icmp-select.ll
    M llvm/test/Transforms/InstCombine/sub-minmax.ll
    M llvm/test/Transforms/InstCombine/sub.ll
    M llvm/test/Transforms/InstCombine/truncating-saturate.ll
    M llvm/test/Transforms/InstCombine/umax-icmp.ll
    M llvm/test/Transforms/InstCombine/umin-icmp.ll
    M llvm/test/Transforms/InstCombine/with_overflow.ll
    M llvm/test/Transforms/InstCombine/xor.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-reduction-predselect.ll
    M llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll
    M llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
    M llvm/test/Transforms/LoopVectorize/bzip_reverse_loops.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/reduction-inloop-pred.ll
    M llvm/test/Transforms/LoopVectorize/reduction-inloop.ll
    M llvm/test/Transforms/LoopVectorize/reduction-predselect.ll
    M llvm/test/Transforms/PhaseOrdering/ARM/arm_mult_q15.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vector-math.ll
    M llvm/test/Transforms/PhaseOrdering/min-max-abs-cse.ll
    M llvm/test/Transforms/PhaseOrdering/minmax.ll
    M llvm/test/Transforms/PhaseOrdering/pr36760.ll
    M llvm/test/Transforms/SLPVectorizer/X86/pr46983.ll

  Log Message:
  -----------
  [InstCombine] Canonicalize SPF to min/max intrinsics

Now that integer min/max intrinsics have good support in both
InstCombine and other passes, start canonicalizing SPF min/max
to intrinsic min/max.

Once this sticks, we can stop matching SPF min/max in various
places, and can remove hacks we have for preventing infinite loops
and breaking of SPF canonicalization.

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




More information about the All-commits mailing list