[PATCH] D142048: [Phabricator] Fix __ptr32 arguments passed to builtins

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 24 16:13:29 PST 2023


arichardson added a comment.

It sounds to me that the logic from b919c7d should have been restricted to actual LLVM intrinsics that are overloaded on the pointer args ( e.g. llvm.memcpy which was the test in that commit). Builtins that are just library calls with known semantics probably need the cast even for opencl?



================
Comment at: clang/test/CodeGen/address-space-ptr32.c:54
+  // CHECK-NEXT:   ret i64 %call
+   return strlen ( s );
+}
----------------
Maybe use `__builtin_strlen` here instead to avoid the declaration?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142048/new/

https://reviews.llvm.org/D142048



More information about the cfe-commits mailing list