As shown, LLVM is keen to avoid logic and introduce selects (in DAGCombiner, and
other places). This leads to control flow on RISC-V which we should attempt to
avoid.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM.
llvm/test/CodeGen/RISCV/select-or.ll | ||
---|---|---|
8–9 | Nit: if the codegen improvement isn't expected to be merged quickly then consider writing something more generic like "illustrates whether we use conditional jumps or additional logic", since for now it might be a bit confusing that the test does generate several branches. |
Comment Actions
Update comment in test to more generally talk about what the test is looking
for, rather than the specific hook in the optimisation.
Comment Actions
I might actually add a few other tests, given i know (select (and A, B), C, D) is also a pattern that appears places.
Nit: if the codegen improvement isn't expected to be merged quickly then consider writing something more generic like "illustrates whether we use conditional jumps or additional logic", since for now it might be a bit confusing that the test does generate several branches.