[llvm] [AMDGPU] Strengthen preload intrinsics to noundef and nonnull (PR #92801)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 11:50:03 PDT 2024


================
@@ -12,11 +12,16 @@
 
 def global_ptr_ty : LLVMQualPointerType<1>;
 
+// The amdgpu-no-* attributes (ex amdgpu-no-workitem-id-z) typically inferred
+// by the backend cause whole-program undefined behavior when violated, such as
+// by causing all other preload register intrinsics to return arbitrarily incorrect
+// values. Outside of such IR-level UB, these preloaded registers are always set
----------------
arsenm wrote:

This logic only really applies in the entry functions 

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


More information about the llvm-commits mailing list