[llvm] ValueTracking: Fix wrong interested mask in SimplifyDemandedFPClass (PR #174072)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 31 00:15:38 PST 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/174072
We are interested in the values that are still candidates, not ones
that have already been ruled out from the uses. Avoids regressions
when new uses are introduced.
>From 2368c97e82a0d262e956177a18d773387276ca7f Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 31 Dec 2025 08:56:37 +0100
Subject: [PATCH] ValueTracking: Fix wrong interested mask in
SimplifyDemandedFPClass
We are interested in the values that are still candidates, not ones
that have already been ruled out from the uses. Avoids regressions
when new uses are introduced.
---
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index 45fa8ee8b33a3..85672cdfe1377 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -2281,7 +2281,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseFPClass(Value *V,
break;
}
default:
- Known = computeKnownFPClass(I, ~DemandedMask, CxtI, Depth + 1);
+ Known = computeKnownFPClass(I, DemandedMask, CxtI, Depth + 1);
break;
}
More information about the llvm-commits
mailing list