[clang] Don't emit int TBAA metadata on more complex FP math libcalls. (PR #107598)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 11:51:28 PDT 2024


================
@@ -686,6 +686,20 @@ static Value *EmitSignBit(CodeGenFunction &CGF, Value *V) {
   return CGF.Builder.CreateICmpSLT(V, Zero);
 }
 
+static bool hasPointerArgsOrPointerReturnType(const Value *V) {
+  if (const CallBase *CB = dyn_cast<CallBase>(V)) {
+    for (const Value *A : CB->args()) {
+      if (A->getType()->isPointerTy()) {
+        return true;
+      }
+    }
+    if (CB->getFunctionType()->getReturnType()->isPointerTy()) {
+      return true;
+    }
----------------
arsenm wrote:

Don't need braces 

https://github.com/llvm/llvm-project/pull/107598


More information about the cfe-commits mailing list