================ @@ -9497,8 +9500,11 @@ Value *CodeGenFunction::EmitSVEScatterStore(const SVETypeFlags &TypeFlags, // mapped to <n x 16 x i1>. However, this might be incompatible with the // actual type being stored. For example, when storing doubles (i64) the // predicated should be <n x 2 x i1> instead. At the IR level the type of - // the predicate and the data being stored must match. Cast accordingly. - Ops[1] = EmitSVEPredicateCast(Ops[1], OverloadedTy); + // the predicate and the data being stored must match. Cast to the type + // expected by the intrinsic. The intrinsic itself should be defined in + // a way that enforces relations between parameter types. + Ops[1] = EmitSVEPredicateCast( + Ops[1], cast<llvm::ScalableVectorType>(F->getArg(1)->getType())); ---------------- CarolineConcatto wrote:
Is this correct? F->getArg(1), is the predicated type, no? Arg[0] = void, Arg[1]= predicate AFAIU we did not shifted the Function arguments. When we do this: Ops.insert(Ops.begin(), Ops.pop_back_val());, does this also shifts F->getArg? https://github.com/llvm/llvm-project/pull/71290 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits