[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 21 23:04:34 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());
----------------
ayalz wrote:

This assert is still missing a message, potentially that of the comment.

https://github.com/llvm/llvm-project/pull/78113


More information about the cfe-commits mailing list