[llvm] [AMDGPU] Add inreg support for SGPR arguments (PR #67182)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 19:32:59 PDT 2023


================
@@ -58,6 +67,18 @@ define void @single_lane_func_arguments(i32 %i32, i1 %i1) #2 {
  ret void
 }
 
+; CHECK-LABEL: for function 'divergent_args':
+; CHECK: DIVERGENT ARGUMENTS
+define void @divergent_args(i32 %i32, i1 %i1) {
+ ret void
+}
+
+; CHECK-LABEL: for function 'no_divergent_args_if_inreg':
+; CHECK-NOT: DIVERGENT
----------------
arsenm wrote:

I think i1 values should still be considered divergent; as a separate change I still want to have those be interpreted as lane masks. It would be better to have a separate test function for the two cases. It's fine for now in this patch 

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


More information about the llvm-commits mailing list