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.
Paths
| Differential D92183
[DAG] Legalize umin(x,y) -> sub(x,usubsat(x,y)) and umax(x,y) -> add(x,usubsat(y,x)) iff usubsat is legal ClosedPublic Authored by RKSimon on Nov 26 2020, 8:05 AM.
Details Summary 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.
Diff Detail
Event TimelineComment Actions LGTM. Thanks for updating the costs too.
This revision is now accepted and ready to land.Nov 26 2020, 10:58 AM
This revision was landed with ongoing or failed builds.Nov 27 2020, 3:19 AM Closed by commit rG969918e177ad: [DAG] Legalize umin(x,y) -> sub(x,usubsat(x,y)) and umax(x,y) -> add(x,usubsat… (authored by RKSimon). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 307871 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
|
LLVM_FALLTHROUGH seems to usually (perhaps always?) be written with a semicolon on the end, even if it needn't.