[llvm] [IR] Add `alwaysuniform` function attribute (PR #214644)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 06:08:34 PDT 2026
================
@@ -0,0 +1,16 @@
+; RUN: opt -mtriple amdgcn-- -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s
+
+; CHECK: DIVERGENT: %divergentval
+; CHECK-NOT: DIVERGENT: %uniformval
+; CHECK: %uniformval
+define void @test() {
+ %divergentval = call i32 @normalfunc()
+ %uniformval = call i32 @alwaysuniformfunc()
+ ret void
+}
+
+declare i32 @normalfunc() #0
+declare i32 @alwaysuniformfunc() #1
+
+attributes #0 = { nounwind }
+attributes #1 = { alwaysuniform nounwind }
----------------
shiltian wrote:
missing EoF line
https://github.com/llvm/llvm-project/pull/214644
More information about the llvm-commits
mailing list