[PATCH] D37568: [AMDGPU] Allow flexible register names in inline asm constraints

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 10:40:17 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Basic/Targets/AMDGPU.h:124
+  /// {sn}, {s[n]}
+  /// {S} , wheere S is a special register name
+  ////{v[n:m]}
----------------
Typo wheere


================
Comment at: lib/Basic/Targets/AMDGPU.h:194
+    Info.setAllowsRegister();
+    Name = S.data() - 1;
+    return true;
----------------
I'm not sure I understand these data() - 1s. 


================
Comment at: test/Sema/inline-asm-validate-amdgpu.cl:74
+    __asm("v_add_f64_e64 v[1:2], v[3:4], v[5:6]" : "=v[1:2]"(ci) : "v[3:4]"(ai), "v[5:6]"(bi) : ); //expected-error {{invalid output constraint '=v[1:2]' in asm}}
+
+    c[i] = ci;
----------------
While you're here can we add some tests for the immediate constraints? There was a bug report recently when using s_trap with the i constraints for the constant operand.


https://reviews.llvm.org/D37568





More information about the cfe-commits mailing list