This patch canonicalizes SIGN_EXTEND to VSELECT to allow sext to transform into a predicated instruction like add, sub or mul.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
To add some extra context @NicolaLancellotti wrote this as an extension to D135596. It requires a lot more changes though, and my feeling is that we might be playing whack-a-mole with generic combines that all assume sext's. As we had the patch I suggested putting it up to see what others thought. So.. what do others think?
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
5418 | I don't think this is limited to scalable vectors? | |
5421 | Could this use isConstantSplatVectorAllOnes? | |
5431 | Could this be part of the if condition? |
Sorry for the delay, but it's likely to be later in the week if not next week before I'll have enough time to review properly.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
5418 | indeed - I'd like to see what effect this has on other targets for fixed vectors (where we have a lot more test coverage e.g. AVX512) | |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
5561 | DAG.getAllOnesConstant ? | |
18364 | !SplatVal.isAllOnes() | |
llvm/test/CodeGen/AArch64/predicated-add-sub-mul.ll | ||
224 | please can you pre-commit these tests with current (trunk) codegen and then rebase the patch to show the codegen diff |
I don't think this is limited to scalable vectors?