[X86] Prevent clang clobber checking for asm flag constraints.

Update getConstraintRegister as X86 Asm flag output constraints are no
longer fully alphanumeric,

llvm-svn: 354211
This commit is contained in:
Nirav Dave 2019-02-17 03:53:23 +00:00
parent 37f30231ba
commit 91ecb69acd
2 changed files with 12 additions and 1 deletions

View File

@ -198,7 +198,7 @@ public:
StringRef Expression) const override {
StringRef::iterator I, E;
for (I = Constraint.begin(), E = Constraint.end(); I != E; ++I) {
if (isalpha(*I))
if (isalpha(*I) || *I == '@')
break;
}
if (I == E)

View File

@ -363,3 +363,14 @@ int test_ccs(long nr, volatile long *addr) {
return 0;
return 1;
}
_Bool check_no_clobber_conflicts() {
//CHECK-LABEL: @check_no_clobber_conflicts
//CHECK: = tail call i8 asm "", "={@cce},~{cx},~{dirflag},~{fpsr},~{flags}"()
_Bool b;
asm(""
: "=@cce"(b)
:
: "cx");
return b;
}