[llvm] [DebugInfo][GVNSink] Fix #77415: GVNSink fails to optimize LLVM IR with debug info (PR #77602)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 10:10:07 PDT 2024


================
@@ -25,9 +27,9 @@ if.else:                                          ; preds = %entry
   br label %if.end
 
 ; CHECK-LABEL: if.end:
-; CHECK: [[SINK:%.*.sink]] = phi i32 [ %a, %if.then ], [ %b, %if.else ]
-; CHECK: %add = add nsw i32 [[SINK]], 1
-; CHECK: %xor = xor i32 %add, 1
+; CHECK: [[SINK:%.*sink]] = phi i32 [ {{.*}} ], [ {{.*}} ]
----------------
hiraditya wrote:

nit: we should have a fixed order here.
maybe swap the PHI operands and see if that passed the check.

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


More information about the llvm-commits mailing list