Add pattern matching for the following instructions:
- smax, smin, umax, umin
| Paths 
 |  Differential  D71779  
[AArch64][SVE] Add patterns for signed and unsigned min/max instructions ClosedPublic Authored by dancgr on Dec 20 2019, 11:06 AM. 
Details Summary Add pattern matching for the following instructions: 
 
Diff Detail 
 Event Timelinedancgr retitled this revision from [AArch64][SVE] Add patterns for some int arith instructions to [AArch64][SVE] Add patterns for signed and unsigned min/max instructions.Dec 20 2019, 11:06 AM Comment Actions Do we actually need an intrinsic for this, as opposed to adding patterns for ISD::SMAX etc.? Comment Actions As far as I know the ISD::SMAX only takes one input (https://llvm.org/docs/LangRef.html#llvm-experimental-vector-reduce-smax-intrinsic), in this case we need two inputs so we can do the max between the input vector and the immediate value. 
 Comment Actions Wong SMAX; you're referring to VECREDUCE_SMAX, which isn't relevant here. There is no IR intrinsic for ISD::SMAX; it's pattern-matched from select instructions. Comment Actions 
 That makes way more sense, I have updated the patch to reflect that. dancgr added inline comments. This revision is now accepted and ready to land.Jan 9 2020, 1:45 PM Closed by commit rG2d7e757a836a: [AArch64][SVE] Add patterns for some arith SVE instructions. (authored by dancgr).  ·  Explain WhyJan 13 2020, 8:41 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 237696 llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
 
 llvm/lib/Target/AArch64/AArch64InstrFormats.td
 
 llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
 llvm/lib/Target/AArch64/SVEInstrFormats.td
 llvm/test/CodeGen/AArch64/sve-int-arith-imm.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Should this be zero extended (getZExtValue)?