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

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 21 13:30:39 PST 2024


================
@@ -433,9 +433,9 @@ define i8 @shl_sub(i8 %x, i8 %y) {
 define i8 @shl_sub_multiuse(i8 %x) {
 ; CHECK-LABEL: @shl_sub_multiuse(
 ; CHECK-NEXT:    [[SH0:%.*]] = shl i8 [[X:%.*]], 3
-; CHECK-NEXT:    [[R:%.*]] = sub i8 [[SH0]], 42 ; constant operand on the 'sub'
----------------
jrtc27 wrote:

I know, but why was it there in the first place. The previous commit added it, but that suggests the first commit is wrong.

And please do not resolve conversations off the bat like that.

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


More information about the llvm-commits mailing list