[llvm] [IPO] Added attributor for identifying invariant loads (PR #141800)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 14:28:29 PDT 2025


================
@@ -0,0 +1,324 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -passes=attributor %s -S | FileCheck %s --check-prefix=AMDGCN
+
+ at G = addrspace(1) global i32 zeroinitializer, align 4
+declare void @clobber(i32) #0
+declare ptr addrspace(1) @get_ptr() #0
+declare noalias ptr addrspace(1) @get_noalias_ptr() #0
+declare noalias ptr addrspace(1) @get_untouched_ptr() #1
+attributes #0 = { nofree norecurse nosync nounwind willreturn }
+attributes #1 = { nofree norecurse nosync nounwind willreturn readonly }
----------------
arsenm wrote:

Keep these at the end of the file 

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


More information about the llvm-commits mailing list