[PATCH] D98449: [RISCV] Add isel-patterns to optimize (a < 1) into bgez

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 11:45:39 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/branch.ll:121
+; Check that we use bgez (0 >= X) for X < 1
+test14:
+  %val14 = load volatile i32, i32* %b
----------------
craig.topper wrote:
> This code is pretty trivially unreachable. The block above jumps over it. I'm a little surprised CodeGenPrepare or UnreachableBlockElim didn't notice that. I'd prefer we make it reachable so it can't break in the future.
I applied this patch and this test case fails because the unreachable block does get deleted. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98449/new/

https://reviews.llvm.org/D98449



More information about the llvm-commits mailing list