forked from OSchip/llvm-project
[Hexagon] Recognize "s" constraint in inline-asm
llvm-svn: 270216
This commit is contained in:
parent
5d08bb72d9
commit
89fb44147b
|
@ -6039,6 +6039,9 @@ public:
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
// Relocatable constant.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,15 @@
|
|||
typedef int v64 __attribute__((__vector_size__(64)))
|
||||
__attribute__((aligned(64)));
|
||||
|
||||
int g;
|
||||
|
||||
void foo(v64 v0, v64 v1, v64 *p) {
|
||||
int r;
|
||||
v64 q0;
|
||||
asm ("%0 = vgtw(%1.w,%2.w)" : "=q"(q0) : "v"(v0), "v"(v1));
|
||||
// CHECK: call <16 x i32> asm "$0 = vgtw($1.w,$2.w)", "=q,v,v"(<16 x i32>{{.*}}, <16 x i32>{{.*}})
|
||||
*p = q0;
|
||||
|
||||
asm ("%0 = memw(##%1)" : "=r"(r) : "s"(&g));
|
||||
// CHECK: call i32 asm "$0 = memw(##$1)", "=r,s"(i32* @g)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue