D135833, lowerSelect: (select C, -1/0, X) -> or/and
Keep (select c, 0/-1, X), thus making better use of lowerSelect to eliminate branch instructions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,070 ms | x64 debian > Clang.Driver::crash-report.cpp |
Event Timeline
Nothing about the title or commit message gives much of a glue about which existing transformation is being modified. There are quite a few select related optimizations. Can you give more detail?
llvm/test/CodeGen/RISCV/select-binop-identity.ll | ||
---|---|---|
1 | Can you add new RUN lines with short forward branch enabled? |
llvm/test/CodeGen/RISCV/select-binop-identity.ll | ||
---|---|---|
34 | There is an extra instruction here, which seems to be caused by PseudoCCMOVGPR. I'll debug it more carefully, maybe a new patch is needed. |
llvm/test/CodeGen/RISCV/select-binop-identity.ll | ||
---|---|---|
34 | The short forward branch optimization does currently require a mv to be in shadow of the branch. Technically the hardware supports most ALU operations in the branch shadow, but that will likely require a pseudo instruction like PseudoCCMOVGPR for each ALU operation to express. |
Can you add new RUN lines with short forward branch enabled?