================ @@ -4072,6 +4078,30 @@ static Value *upgradeX86IntrinsicCall(StringRef Name, CallBase *CI, Function *F, return Rep; } +static Value *upgradeAArch64IntrinsicCall(StringRef Name, CallBase *CI, + Function *F, IRBuilder<> &Builder) { + Intrinsic::ID NewID = + StringSwitch<Intrinsic::ID>(Name) + .Case("sve.fcvt.bf16f32", Intrinsic::aarch64_sve_fcvt_bf16f32_v2) + .Case("sve.fcvtnt.bf16f32", Intrinsic::aarch64_sve_fcvtnt_bf16f32_v2) + .Default(Intrinsic::not_intrinsic); + if (NewID == Intrinsic::not_intrinsic) + llvm_unreachable("Unhandled Intrinsic!"); + + SmallVector<Value *, 3> Args(CI->args()); + + // The original intrinsics incorrectly used a predicate based on the smallest + // element type rather than the largest. + Type *PredTy = ScalableVectorType::get(Builder.getInt1Ty(), 4); + Args[1] = Builder.CreateIntrinsic(Intrinsic::aarch64_sve_convert_to_svbool, ---------------- paulwalker-arm wrote:
Done. https://github.com/llvm/llvm-project/pull/110281 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits