return StringSwitch<MIToken::TokenKind>(Identifier)
.Case("!tbaa", MIToken::md_tbaa)
.Case("!alias.scope", MIToken::md_alias_scope)
+ .Case("!noalias", MIToken::md_noalias)
.Default(MIToken::Error);
}
if (parseMDNode(AAInfo.Scope))
return true;
break;
- // TODO: Parse AA NoAlias metadata.
+ case MIToken::md_noalias:
+ lex();
+ if (parseMDNode(AAInfo.NoAlias))
+ return true;
+ break;
// TODO: Parse the ranges metadata.
// TODO: Report an error on duplicate metadata nodes.
default:
- return error("expected 'align' or '!tbaa' or '!alias.scope'");
+ return error(
+ "expected 'align' or '!tbaa' or '!alias.scope' or '!noalias'");
}
}
if (expectAndConsume(MIToken::rparen))
OS << ", !alias.scope ";
AAInfo.Scope->printAsOperand(OS, MST);
}
- // TODO: Print AA NoAlias metadata.
+ if (AAInfo.NoAlias) {
+ OS << ", !noalias ";
+ AAInfo.NoAlias->printAsOperand(OS, MST);
+ }
// TODO: Print the ranges metadata.
OS << ')';
}
; CHECK-LABEL: name: aa_scope
; CHECK: %xmm0 = MOVSSrm %rsi, 1, _, 0, _ :: (load 4 from %ir.c, !alias.scope !9)
%xmm0 = MOVSSrm %rsi, 1, _, 0, _ :: (load 4 from %ir.c, !alias.scope !9)
- MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i)
+ ; CHECK-NEXT: MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i, !noalias !9)
+ MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i, !noalias !9)
%xmm0 = MOVSSrm killed %rsi, 1, _, 0, _ :: (load 4 from %ir.c)
MOVSSmr killed %rdi, 1, _, 28, _, killed %xmm0 :: (store 4 into %ir.arrayidx)
RETQ