This patch takes some of the code from D49837 to allow us to enable ISD::ABS support for all SSE vector types.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Add SSE41+ ABS(vXi64 X) optimization using VPBLENDVPD(X, 0-X, X), I can split this off as a separate commit if people prefer.
test/CodeGen/AArch64/iabs.ll | ||
---|---|---|
46 | This sequence is legal, but it isn't actually a good idea; the new sequence is one instruction longer, and has much higher latency. AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN should probably generate a v1i64 ISD::ABS, not an i64 ISD::ABS. |
test/CodeGen/AArch64/iabs.ll | ||
---|---|---|
46 | Do you want me to add that change to this patch? |
test/CodeGen/AArch64/iabs.ll | ||
---|---|---|
46 | Probably should be a separate patch. I'll try to take care of it soon. |
@efriedma I've reduced the aarch64 side to just the test codegen change. I think that should be enough to let this patch continue and any aarch64 side perf tweaks can be done in parallel?
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | ||
---|---|---|
758 | Need to check ISD::ABS in the switch in VectorLegalizer::LegalizeOp that controls the call to TLI.getOperationAction. Otherwise its not considered a vector op and gets delayed to LegalizeDAG. |
Need to check ISD::ABS in the switch in VectorLegalizer::LegalizeOp that controls the call to TLI.getOperationAction. Otherwise its not considered a vector op and gets delayed to LegalizeDAG.