[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:07 PST 2024
================
@@ -1117,13 +1119,7 @@ void VPScalarIVStepsRecipe::execute(VPTransformState &State) {
// Ensure step has the same type as that of scalar IV.
Type *BaseIVTy = BaseIV->getType()->getScalarType();
- if (BaseIVTy != Step->getType()) {
- // TODO: Also use VPDerivedIVRecipe when only the step needs truncating, to
- // avoid separate truncate here.
- assert(Step->getType()->isIntegerTy() &&
- "Truncation requires an integer step");
- Step = State.Builder.CreateTrunc(Step, BaseIVTy);
- }
+ assert(BaseIVTy == Step->getType());
----------------
fhahn wrote:
Added, thanks!
https://github.com/llvm/llvm-project/pull/78113
More information about the cfe-commits
mailing list