[PATCH] D128790: [InstCombine] improve fold for icmp_eq_and to icmp_ult
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 05:47:48 PDT 2022
spatel added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/lshr-and-negC-icmpeq-zero.ll:203
+define i1 @scalar_i32_lshr_and_negC_eq_X_is_constant3(i32 %y) {
+; CHECK-LABEL: @scalar_i32_lshr_and_negC_eq_X_is_constant3(
----------------
This is almost the same as `@scalar_i32_lshr_and_negC_eq_X_is_constant1`.
We would have better coverage if this is changed to use udiv instead of lshr. Also, change predicate to 'ne' so we are testing that code path too.
We should also have a negative test where the high bits are all clear except for the last necessary bit - that way, we will know that the known-bits calculation is correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128790/new/
https://reviews.llvm.org/D128790
More information about the llvm-commits
mailing list