[PATCH] D21710: AMDGPU/R600: Add PatFrags for selecting the correct vtx id for loads

Jan Vesely via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 25 13:42:45 PDT 2016


jvesely accepted this revision.
jvesely added a comment.

In http://reviews.llvm.org/D21710#467057, @arsenm wrote:

> LGTM, but I still thinking checking GetUnderlyingObject for selection is broken. It should at least check for it returning null which is common


What are the problems with GetUnderLyingObject? Don't CLC restrictions shield us from potentially failing cases (the only objects are initialized in constant AS)?

with or without renaming the instructions LGTM.


================
Comment at: lib/Target/AMDGPU/EvergreenInstructions.td:239
@@ -238,3 +238,3 @@
 def VTX_READ_GLOBAL_8_eg : VTX_READ_8_eg <1,
-  [(set i32:$dst_gpr, (az_extloadi8_global ADDRVTX_READ:$src_gpr))]
+  [(set i32:$dst_gpr, (vtx_id1_az_extloadi8 ADDRVTX_READ:$src_gpr))]
 >;
----------------
I think it'd also make sense to rename the instructions:
VTX_READ_GLOBAL -> VTX_READ_ID1. so the vtx to AS assignment is reduced to one place (the pattern).



http://reviews.llvm.org/D21710





More information about the llvm-commits mailing list