[PATCH] D17892: AMDGPU/SI: Implement S_GETREG Intrinsic

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 09:57:38 PST 2016


arsenm added a comment.

SC has some prettier syntax for the values being read, but that can be a separate patch


================
Comment at: include/llvm/IR/IntrinsicsAMDGPU.td:221
@@ +220,3 @@
+def int_amdgcn_s_getreg :
+  Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
+
----------------
This needs to be read only. In special cases the call site can be marked readnone

================
Comment at: lib/Target/AMDGPU/SIInstructions.td:2076
@@ +2075,3 @@
+  (int_amdgcn_s_getreg imm:$simm16),
+  (S_GETREG_B32 (as_i16imm $simm16))
+>;
----------------
You should be able to put this in the instruction definition 


http://reviews.llvm.org/D17892





More information about the llvm-commits mailing list