[llvm] [VPlan] Ignore incoming values with constant false mask. (PR #89384)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 06:08:26 PDT 2024
================
@@ -67,14 +67,17 @@ struct specific_intval {
CI = dyn_cast_or_null<ConstantInt>(
C->getSplatValue(/*AllowPoison=*/false));
- return CI && APInt::isSameValue(CI->getValue(), Val);
+ return CI && APInt::isSameValue(CI->getValue(), Val) &&
+ (BitWidth == 0 || CI->getBitWidth() == BitWidth);
}
};
-inline specific_intval m_SpecificInt(uint64_t V) {
- return specific_intval(APInt(64, V));
+inline specific_intval<0> m_SpecificInt(uint64_t V) {
+ return specific_intval<0>(APInt(64, V));
}
+inline specific_intval<1> m_False() { return specific_intval<1>(APInt(64, 0)); }
----------------
fhahn wrote:
Added an assert before checking `APInt::isSameValue(CI->getValue(), Val)`, thanks!
https://github.com/llvm/llvm-project/pull/89384
More information about the llvm-commits
mailing list