Similar to our free standing setcc patterns, we can use ADDI to
subtract the immediate from the other operand. Then the cmov
can check if the result is zero or non-zero.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM
llvm/lib/Target/RISCV/RISCVInstrInfoB.td | ||
---|---|---|
786 | Out of curiosity do you think it would make sense at some point to have a pass that just removes ADDI x, 0 (and XOR x, 0 etc.) after instruction selection? Then we could presumably delete the two patterns above. |
Out of curiosity do you think it would make sense at some point to have a pass that just removes ADDI x, 0 (and XOR x, 0 etc.) after instruction selection? Then we could presumably delete the two patterns above.