================ @@ -5232,9 +5232,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // since otherwise we could be making a conditional call after a check for // the proper cpu features (and it won't cause code generation issues due to // function based code generation). - if (TargetDecl->hasAttr<AlwaysInlineAttr>() && - (TargetDecl->hasAttr<TargetAttr>() || - (CurFuncDecl && CurFuncDecl->hasAttr<TargetAttr>()))) + if ((TargetDecl->hasAttr<AlwaysInlineAttr>() && + (TargetDecl->hasAttr<TargetAttr>() || + (CurFuncDecl && CurFuncDecl->hasAttr<TargetAttr>()))) || + (CurFuncDecl && CurFuncDecl->hasAttr<FlattenAttr>() && + TargetDecl->hasAttr<TargetAttr>())) ---------------- abhishek-kaushik22 wrote:
>From what I understand, we only need to check that the callee function has >`TargetAttr` because the error is inlining a function that uses a target >feature which the caller isn't compiled for. The caller having `TargetAttr` >isn't required to reproduce the crash. https://github.com/llvm/llvm-project/pull/150044 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits