[llvm] [InstCombine] fold icmp of select with invertible shl (PR #147182)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 9 07:57:38 PST 2025


================
@@ -923,3 +923,30 @@ define i1 @shl_nuw_ne(i8 %a, i8 %b, i8 %c, i1 %cond) {
   %cmp = icmp ne i8 %sel, %shl_a
   ret i1 %cmp
 }
+
+define i1 @shl_const_phi_failed_to_simplify(i64 %indvars, i32 %conv) {
----------------
actinks wrote:

Thanks @dtcxzyw . The issue, caused by the "right-shift mode" only intercepting constants and failing to intercept phi nodes with two constant incoming values, has been temporarily resolved by reverting to a previous version.

https://github.com/llvm/llvm-project/pull/147182


More information about the llvm-commits mailing list