[PATCH] D137154: Adding nvvm_reflect clang builtin
    Hugh Delaney via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov  1 06:25:22 PDT 2022
    
    
  
hdelan added inline comments.
================
Comment at: llvm/include/llvm/IR/IntrinsicsNVVM.td:1581
 def int_nvvm_reflect :
-  Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">;
+  Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem], "llvm.nvvm.reflect">,
+  ClangBuiltin<"__nvvm_reflect">;
----------------
asavonic wrote:
> What is there a reason to change the intrinsic?
The clang builtin doesn't link up properly with the llvm intrinsic if `llvm_anyptr_ty` is used. The `llvm_anyptr_ty` suggests to clang to find a general `arg` parameter instead of an `Pointer` which results in a segfault. Changing to `llvm_ptr_ty` fixes the issue
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137154/new/
https://reviews.llvm.org/D137154
    
    
More information about the llvm-commits
mailing list