[llvm] 1a34007 - [VPlan] Inline WidenSelect::isInvariantCond (NFC) (#166742)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 23:54:55 PST 2025
Author: Ramkumar Ramachandra
Date: 2025-11-07T07:54:51Z
New Revision: 1a34007f5f86088d59b0c5ce86ead58fb12177e0
URL: https://github.com/llvm/llvm-project/commit/1a34007f5f86088d59b0c5ce86ead58fb12177e0
DIFF: https://github.com/llvm/llvm-project/commit/1a34007f5f86088d59b0c5ce86ead58fb12177e0.diff
LOG: [VPlan] Inline WidenSelect::isInvariantCond (NFC) (#166742)
VPWidenSelectRecipe::isInvariantCond has a sole use: inline it in the
use-site, as it is not meant to be used standalone.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 3062e1ca26af5..5851b3ab7978c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1762,15 +1762,11 @@ struct LLVM_ABI_FOR_TEST VPWidenSelectRecipe : public VPRecipeWithIRFlags,
return getOperand(0);
}
- bool isInvariantCond() const {
- return getCond()->isDefinedOutsideLoopRegions();
- }
-
/// Returns true if the recipe only uses the first lane of operand \p Op.
bool usesFirstLaneOnly(const VPValue *Op) const override {
assert(is_contained(operands(), Op) &&
"Op must be an operand of the recipe");
- return Op == getCond() && isInvariantCond();
+ return Op == getCond() && Op->isDefinedOutsideLoopRegions();
}
};
More information about the llvm-commits
mailing list