[PATCH] D62787: [X86] Add the vector integer min/max instructions to isAssociativeAndCommutative.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 1 18:38:22 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, andreadb.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

As far as I know these should be freely reassociatable just like
the floating point MAXC/MINC instructions.

The test changes demonstrate that something happened from this
patch, but I'm not sure we always made the right choice. I
think the fact that llc defaults to "generic" CPU is causing
us to not have a scheduler model so MachineCombiner doesn't
make the best decisions. But this isn't unique to these
instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62787

Files:
  llvm/lib/Target/X86/X86InstrInfo.cpp
  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/vector-reduce-smax-widen.ll
  llvm/test/CodeGen/X86/vector-reduce-smax.ll
  llvm/test/CodeGen/X86/vector-reduce-smin-widen.ll
  llvm/test/CodeGen/X86/vector-reduce-smin.ll
  llvm/test/CodeGen/X86/vector-reduce-umax-widen.ll
  llvm/test/CodeGen/X86/vector-reduce-umax.ll
  llvm/test/CodeGen/X86/vector-reduce-umin-widen.ll
  llvm/test/CodeGen/X86/vector-reduce-umin.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62787.202576.patch
Type: text/x-patch
Size: 139865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190602/6a5fc4b6/attachment.bin>


More information about the llvm-commits mailing list