This patch optimises the lowering for some vector types for the min/max instruction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
---|---|---|
172 | I'm not sure you have to clamp the elements on a v2s64, as they are going to be expanded anyway. Should it be dealing with vXi16 and vXi8 though? |
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
---|---|---|
171 | You can use clampMin/MaxNumElts instead to do these. |
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
---|---|---|
171 | It looks like clampNumElements is a wrapper around clampMinNumElements(..).clampMaxNumElements(..); Out of interest, what would make the individual methods better to use themselves? Is it something about how small types are widened? | |
172 | It turns out that G_ICMP doesn't support splitting vectors yet, which is why v2s64 is here too. Otherwise it could be lowered. (It might be worth added a FIXME to that extent.) |
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
---|---|---|
171 | You're right, I had the which-implements-which relation swapped in my head. |
You can use clampMin/MaxNumElts instead to do these.