[PATCH] D159131: [RISCV][GlobalISel] Select G_ICMP
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 15:03:53 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp:171
+
+ bool HasImm = false;
+ int64_t Imm;
----------------
We don't have to handle this case explicitly as long as we don't match ugt X, -1 in the tablegen pattern. It's completely fine to emit
```
li a1, -1
sltu a0, a1, a0
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159131/new/
https://reviews.llvm.org/D159131
More information about the llvm-commits
mailing list