[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)
Florian Hahn via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 22 04:51:04 PST 2024
================
@@ -504,6 +504,15 @@ static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID,
HeaderVPBB->insert(BaseIV->getDefiningRecipe(), IP);
}
+ VPTypeAnalysis TypeInfo(SE.getContext());
+ if (TypeInfo.inferScalarType(BaseIV) != TypeInfo.inferScalarType(Step)) {
+ Step = new VPScalarCastRecipe(Instruction::Trunc, Step,
----------------
fhahn wrote:
Yes, here the only use-case is `Trunc`, but the implementation of the recipe is intentionally kept generic for any cast where only the first lane is used, so it can be used directly in #76172
https://github.com/llvm/llvm-project/pull/78113
More information about the cfe-commits
mailing list