[llvm] [InstCombine] Resolve TODO: Remove one-time check if other logic operand (Y) is constant (PR #77973)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 12:39:38 PST 2024


================
@@ -240,6 +240,21 @@ define i32 @lshr_or_extra_use(i32 %x, i32 %y, ptr %p) {
   ret i32 %sh1
 }
 
+define i32 @lshr_or_extra_use_multiuse(i32 %x, ptr %p) {
----------------
nikic wrote:

Ah sorry, I now see that the lshr_or_extra_use test has the multi-use on the binop, not the shift. So please make this `store i32 %sh0, ptr %p` and then you'll have to add a second test that's the same just with the variable `%y` operand in the or.

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


More information about the llvm-commits mailing list