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

2017-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314452: [AMDGPU] Allow flexible register names in inline asm constraints (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D37568?vs=116383&id=117037#toc Repository: rL LLVM ht

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

2017-09-28 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner accepted this revision. b-sumner added a comment. This revision is now accepted and ready to land. LGTM. I think we can leave immediates to another patch. https://reviews.llvm.org/D37568 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2017-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. Ping. Brian, Stas, Can you review this since Matt is on vacation? Thanks. https://reviews.llvm.org/D37568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

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

2017-09-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. 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

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

2017-09-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 116383. yaxunl marked 4 inline comments as done. yaxunl edited the summary of this revision. yaxunl added a comment. Fix typo. https://reviews.llvm.org/D37568 Files: lib/Basic/Targets/AMDGPU.h test/CodeGenOpenCL/amdgcn-inline-asm.cl test/Sema/inline-as

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

2017-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Basic/Targets/AMDGPU.h:194 +Info.setAllowsRegister(); +Name = S.data() - 1; +return true; arsenm wrote: > I'm not sure I understand these data() - 1s. The caller o

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

2017-09-15 Thread Matt Arsenault via Phabricator via cfe-commits
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();

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

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 114367. yaxunl edited the summary of this revision. yaxunl added a comment. Allow {v[n]} and {s[n]}. Add more tests. https://reviews.llvm.org/D37568 Files: lib/Basic/Targets/AMDGPU.h test/CodeGenOpenCL/amdgcn-inline-asm.cl test/Sema/inline-asm-validate

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

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D37568#863735, @b-sumner wrote: > The assembler accepts v[N] in addition to vN. I'm not sure if that is needed > here. Then we'd better also allow that in constraints to avoid confusion of users. https://reviews.llvm.org/D37568

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

2017-09-07 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. The assembler accepts v[N] in addition to vN. I'm not sure if that is needed here. https://reviews.llvm.org/D37568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

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

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 114223. yaxunl marked 3 inline comments as done. yaxunl edited the summary of this revision. yaxunl added a comment. Revised by Matt's comments. https://reviews.llvm.org/D37568 Files: lib/Basic/Targets/AMDGPU.h test/CodeGenOpenCL/amdgcn-inline-asm.cl t

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

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/Sema/inline-asm-validate-amdgpu.cl:38 +__asm("v_add_f32_e32 v1, v2, v3" : "=v1"(ci) : "v2"(ai), "v3"(bi) : ); /// expected-error {{invalid output constraint '=v1' in asm}} +__asm("v_add_f32_e32 v1, v2, v3" : "=v1:2"(ci) : "v

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

2017-09-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: test/Sema/inline-asm-validate-amdgpu.cl:38 +__asm("v_add_f32_e32 v1, v2, v3" : "=v1"(ci) : "v2"(ai), "v3"(bi) : ); /// expected-error {{invalid output constraint '=v1' in asm}} +__asm("v_add_f32_e32 v1, v2, v3" : "=v1:2"(ci) : "v

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

2017-09-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: test/Sema/inline-asm-validate-amdgpu.cl:38 +__asm("v_add_f32_e32 v1, v2, v3" : "=v1"(ci) : "v2"(ai), "v3"(bi) : ); /// expected-error {{invalid output constraint '=v1' in asm}} +__asm("v_add_f32_e32 v1, v2, v3" : "=v1:2"(ci) : "v

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

2017-09-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Herald added subscribers: eraman, t-tye, tpr, dstuttard, nhaehnle, wdng, kzhuravl. Currently AMDGPU inline asm only allow "v" and "s" as register names in constraints. This patch allows the following register names in constraints: (n, m is unsigned integer, n < m)