[llvm] [X86] Return from SimplifyDemandedBitsForTargetNode for X86ISD::CMOV/ANDP after computing KnownBits. NFC (PR #141992)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 10:28:18 PDT 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/141992
If we break out of the switch, I believe we fall back to the generic SimplifyDemandedBitsForTargetNode which will call computeKnownBitsForTargetNode. This will recurse again and calculate it's own KnownBits. Since we already did the recursion, we should keep the results.
>From 8ac2a26bf258fd7ef19f0c90460058e97680c7b4 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 29 May 2025 10:16:58 -0700
Subject: [PATCH] [X86] Return from SimplifyDemandedBitsForTargetNode for
X86ISD::CMOV/ANDP after computing KnownBits. NFC
If we break out of the switch, I believe we fall back to the
generic SimplifyDemandedBitsForTargetNode which will call
computeKnownBitsForTargetNode. This will recurse again and calculate
it's own KnownBits. Since we already did the recursion, we should
keep the results.
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 6b71f49165c60..ecadc86a0b781 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -44789,7 +44789,7 @@ bool X86TargetLowering::SimplifyDemandedBitsForTargetNode(
// Only known if known in both the LHS and RHS.
Known = Known.intersectWith(Known2);
- break;
+ return false;
}
case X86ISD::BEXTR:
case X86ISD::BEXTRI: {
More information about the llvm-commits
mailing list