RISCV ISA only has instructions for checking if a number is less than another. We select for all conditional codes in terms of these.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp | ||
---|---|---|
231 | There's a corner case here for Predicate::ICMP_UGT with Imm=-1. That compare should return false because nothing is larger than -1, but if you increment it and turn it into ICMP_ULT with imm 0 followed by XOR, it would always produce true. |
Comment Actions
I changed the way I was handling HasImm to match SelectionDAG, but on closer look I think I might be making a mistake? Let me quickly look into this.
Make this 0