================
@@ -692,23 +692,22 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const
FunctionDecl *FD,
RValue Call =
CGF.EmitCall(E->getCallee()->getType(), callee, E, ReturnValueSlot());
- // Check the supported intrinsic.
+ ASTContext &Context = CGF.getContext();
if (unsigned BuiltinID = FD->getBuiltinID()) {
auto IsErrnoIntrinsic = [&]() -> unsigned {
- switch (BuiltinID) {
- case Builtin::BIexpf:
- case Builtin::BI__builtin_expf:
- case Builtin::BI__builtin_expf128:
+ // Check whether a FP math builtin function, such as BI__builtin_expf
+ QualType ResultTy = FD->getReturnType();
+ bool IsMathLibCall =
+ Context.BuiltinInfo.isLibFunction(BuiltinID) ||
+ Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID);
+ if (IsMathLibCall && CGF.ConvertType(ResultTy)->isFloatingPointTy())
----------------
arsenm wrote:
Although in the context of this patch, I don't see why any of this is relevant
for emitting TBAA
https://github.com/llvm/llvm-project/pull/100302
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits