================ @@ -9924,12 +9917,56 @@ Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, // immediate requires more than a handful of bits. *Result = Result->extOrTrunc(32); Ops.push_back(llvm::ConstantInt::get(getLLVMContext(), *Result)); + continue; + } + + if (IsTupleGetOrSet) { + Ops.push_back(EmitScalarExpr(E->getArg(i))); + continue; } + + if (!isa<ScalableVectorType>(Arg->getType())) { + Ops.push_back(Arg); + continue; + } + + auto *VTy = cast<ScalableVectorType>(Arg->getType()); + unsigned MinElts = VTy->getMinNumElements(); + bool IsPred = VTy->getElementType()->isIntegerTy(1); + unsigned N = (MinElts * VTy->getScalarSizeInBits()) / (IsPred ? 16 : 128); + + if (N == 1) { + Ops.push_back(Arg); + continue; + } + + for (unsigned I = 0; I < N; ++I) { + Value *Idx = ConstantInt::get(CGM.Int64Ty, (I * MinElts) / N); + auto *NewVTy = + ScalableVectorType::get(VTy->getElementType(), MinElts / N); + Ops.push_back(Builder.CreateExtractVector(NewVTy, Arg, Idx)); + } + } + + return; ---------------- sdesmalen-arm wrote:
`return` is unnecessary for a function returning `void`. https://github.com/llvm/llvm-project/pull/70662 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits