Skip to content

Commit

Permalink
[globalisel] Small correction to the fixup in 0a08139. The two ID's a…
Browse files Browse the repository at this point in the history
…re not the same size

The rule ID is a uint64_t as it has global scope but the UID is scoped to
the rule and expected to be much smaller so it's only unsigned.
  • Loading branch information
dsandersllvm committed Dec 18, 2019
1 parent e14ff22 commit 3a779b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/utils/TableGen/GICombinerEmitter.cpp
Expand Up @@ -291,7 +291,7 @@ static const DagInit *getDagWithOperatorOfSubClass(const Init &N,

StringRef makeNameForAnonInstr(CombineRule &Rule) {
return insertStrTab(to_string(
format("__anon%" PRIu64 "_%" PRIu64, Rule.getID(), Rule.allocUID())));
format("__anon%" PRIu64 "_%u", Rule.getID(), Rule.allocUID())));
}

StringRef makeDebugName(CombineRule &Rule, StringRef Name) {
Expand All @@ -300,7 +300,7 @@ StringRef makeDebugName(CombineRule &Rule, StringRef Name) {

StringRef makeNameForAnonPredicate(CombineRule &Rule) {
return insertStrTab(to_string(
format("__anonpred%" PRIu64 "_%" PRIu64, Rule.getID(), Rule.allocUID())));
format("__anonpred%" PRIu64 "_%u", Rule.getID(), Rule.allocUID())));
}

void CombineRule::declareMatchData(StringRef PatternSymbol, StringRef Type,
Expand Down

0 comments on commit 3a779b7

Please sign in to comment.