[llvm] [InstCombine] Replace all dominated uses of condition with constants (PR #105510)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 14:31:56 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:%.*]]
----------------
nikic wrote:
Usually tests use just one dummy condition for all br's because it worked before. Now we may have to use several to prevent branches getting optimized away.
Though looking a bit closer at this one in particular, it looks like it does actually want to test two contradictory branches (but will still no longer cover the original issue because the relevant code is optimized away instead).
https://github.com/llvm/llvm-project/pull/105510
More information about the llvm-commits
mailing list