[llvm] [InstCombine] Replace all dominated uses of condition with constants (PR #105510)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 22:31:45 PDT 2024
================
@@ -1664,11 +1664,9 @@ define i64 @pr92084(double %x) {
; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double [[X:%.*]], 0.000000e+00
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then1:
-; CHECK-NEXT: br i1 [[CMP]], label [[IF_ELSE]], label [[IF_THEN2:%.*]]
+; CHECK-NEXT: br i1 true, label [[IF_ELSE]], label [[IF_THEN2:%.*]]
----------------
dtcxzyw wrote:
> Need to use independent condition for the second branch.
No. The original issue only reproduces with effectively unreachable uses of `%x`. Using an independent condition for the second branch will break this.
https://github.com/llvm/llvm-project/pull/105510
More information about the llvm-commits
mailing list