[llvm] [InstCombine] Remove some of the complexity-based canonicalization (PR #91185)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 08:35:40 PDT 2024


================
@@ -261,9 +261,12 @@ define i32 @test10_commuted(i32 %A, i32 %B) {
 
 define i32 @test10_extrause(i32 %A, i32 %B, ptr %dst) {
 ; CHECK-LABEL: @test10_extrause(
-; CHECK-NEXT:    [[NOT:%.*]] = xor i32 [[A:%.*]], -1
+; CHECK-NEXT:    [[XOR1:%.*]] = xor i32 [[B:%.*]], [[A:%.*]]
+; CHECK-NEXT:    [[NOT:%.*]] = xor i32 [[A]], -1
 ; CHECK-NEXT:    store i32 [[NOT]], ptr [[DST:%.*]], align 4
-; CHECK-NEXT:    ret i32 -1
+; CHECK-NEXT:    [[XOR2:%.*]] = xor i32 [[B]], [[NOT]]
+; CHECK-NEXT:    [[OR:%.*]] = or i32 [[XOR1]], [[XOR2]]
+; CHECK-NEXT:    ret i32 [[OR]]
----------------
goldsteinn wrote:

regression + below

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


More information about the llvm-commits mailing list