File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,10 @@ bool InlineAsmLexer::lexTokenInternal(InlineAsmToken &Result) {
195
195
} else if (Char == ' |' ) {
196
196
++CurPtr;
197
197
Kind = asmtok::pipe;
198
+ } else if (isIdentifierContinue (Char)) {
199
+ // PTX allows % builtin-identifier.
200
+ Result.setFlag (InlineAsmToken::NeedsCleaning);
201
+ return lexIdentifierContinue (Result, CurPtr);
198
202
} else {
199
203
// error: unknown escaped characher.
200
204
return false ;
Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ __global__ void gpu_ptx(int *d_ptr, int length) {
17
17
unsigned int WARP_SZ;
18
18
// CHECK: laneid = item_ct1.get_sub_group().get_local_linear_id();
19
19
asm (" mov.u32 %0, %%laneid;" : " =r" (laneid));
20
+
21
+ // CHECK: laneid = item_ct1.get_sub_group().get_local_linear_id();
22
+ asm (" mov.u32 %0, %laneid;" : " =r" (laneid));
23
+
24
+ // CHECK: warpid = item_ct1.get_sub_group().get_group_linear_id();
25
+ asm (" mov.u32 %0, %%warpid;" : " =r" (warpid));
20
26
21
27
// CHECK: warpid = item_ct1.get_sub_group().get_group_linear_id();
22
28
asm (" mov.u32 %0, %%warpid;" : " =r" (warpid));
You can’t perform that action at this time.
0 commit comments