[all-commits] [llvm/llvm-project] 507caa: [X86] Add custom ISD::VEC_REDUCE_*MIN/MAX lowering...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Apr 29 08:41:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 507caafe0fe7e838dc879bdfad2420d77fe5799e
      https://github.com/llvm/llvm-project/commit/507caafe0fe7e838dc879bdfad2420d77fe5799e
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/intrinsic-cttz-elts.ll
    M llvm/test/CodeGen/X86/vector-extract-last-active.ll
    M llvm/test/CodeGen/X86/vector-reduce-smax.ll
    M llvm/test/CodeGen/X86/vector-reduce-smin.ll
    M llvm/test/CodeGen/X86/vector-reduce-umax.ll
    M llvm/test/CodeGen/X86/vector-reduce-umin.ll

  Log Message:
  -----------
  [X86] Add custom ISD::VEC_REDUCE_*MIN/MAX lowering (#194848)

Pulled out of #194473 - update combineMinMaxReduction to fold to a
ISD::VECREDUCE_SMAX/SMIN/UMAX/UMIN node and then perform the lowering
later on.

combineMinMaxReduction will go away once we can use
shouldExpandReduction, rely on the middle-end to recognise reductions
and not have to recreate them from the expanded patterns.

I've added pre-SSE41 handling using vector unrolling - hopefully this
will go away once #194672 is in place.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list