[PATCH] D92183: [DAG] Legalize umin(x,y) -> sub(x,usubsat(x,y)) and umax(x,y) -> add(x,usubsat(y,x)) iff usubsat is legal

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 08:05:34 PST 2020


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, dmgreen, t.p.northover, lebedev.ri.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: LLVM.
RKSimon requested review of this revision.

If usubsat() is legal, this is likely to result in smaller codegen expansion than the default cmp+select codegen expansion.

Allows us to move the x86-specific lowering to the generic expansion code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92183

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/Analysis/CostModel/AArch64/min-max.ll
  llvm/test/CodeGen/X86/midpoint-int-vec-128.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92183.307871.patch
Type: text/x-patch
Size: 5606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201126/1e4eee8e/attachment.bin>


More information about the llvm-commits mailing list