forked from OSchip/llvm-project
[VPlan] Add value numbering in unit test after 65c4d6191f
.
This commit is contained in:
parent
80e56ad9ae
commit
87e258bc2b
|
@ -707,16 +707,16 @@ edge [fontname=Courier, fontsize=30]
|
|||
compound=true
|
||||
N0 [label =
|
||||
"bb1:\l" +
|
||||
" EMIT vp\<%0\> = add\l" +
|
||||
" EMIT vp\<%1\> = sub vp\<%0\>\l" +
|
||||
" EMIT br vp\<%0\> vp\<%1\>\l" +
|
||||
" EMIT vp\<%1\> = add\l" +
|
||||
" EMIT vp\<%2\> = sub vp\<%1\>\l" +
|
||||
" EMIT br vp\<%1\> vp\<%2\>\l" +
|
||||
"Successor(s): bb2\l"
|
||||
]
|
||||
N0 -> N1 [ label=""]
|
||||
N1 [label =
|
||||
"bb2:\l" +
|
||||
" EMIT vp\<%3\> = mul vp\<%1\> vp\<%0\>\l" +
|
||||
" EMIT ret vp\<%3\>\l" +
|
||||
" EMIT vp\<%4\> = mul vp\<%2\> vp\<%1\>\l" +
|
||||
" EMIT ret vp\<%4\>\l" +
|
||||
"No successors\l"
|
||||
]
|
||||
}
|
||||
|
@ -724,9 +724,9 @@ compound=true
|
|||
EXPECT_EQ(ExpectedStr, FullDump);
|
||||
|
||||
const char *ExpectedBlock1Str = R"(bb1:
|
||||
EMIT vp<%0> = add
|
||||
EMIT vp<%1> = sub vp<%0>
|
||||
EMIT br vp<%0> vp<%1>
|
||||
EMIT vp<%1> = add
|
||||
EMIT vp<%2> = sub vp<%1>
|
||||
EMIT br vp<%1> vp<%2>
|
||||
Successor(s): bb2
|
||||
)";
|
||||
std::string Block1Dump;
|
||||
|
@ -736,8 +736,8 @@ Successor(s): bb2
|
|||
|
||||
// Ensure that numbering is good when dumping the second block in isolation.
|
||||
const char *ExpectedBlock2Str = R"(bb2:
|
||||
EMIT vp<%3> = mul vp<%1> vp<%0>
|
||||
EMIT ret vp<%3>
|
||||
EMIT vp<%4> = mul vp<%2> vp<%1>
|
||||
EMIT ret vp<%4>
|
||||
No successors
|
||||
)";
|
||||
std::string Block2Dump;
|
||||
|
@ -751,7 +751,7 @@ No successors
|
|||
VPSlotTracker SlotTracker(&Plan);
|
||||
I3->print(OS, "", SlotTracker);
|
||||
OS.flush();
|
||||
EXPECT_EQ("EMIT br vp<%0> vp<%1>", I3Dump);
|
||||
EXPECT_EQ("EMIT br vp<%1> vp<%2>", I3Dump);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -759,7 +759,7 @@ No successors
|
|||
raw_string_ostream OS(I4Dump);
|
||||
OS << *I4;
|
||||
OS.flush();
|
||||
EXPECT_EQ("EMIT vp<%3> = mul vp<%1> vp<%0>", I4Dump);
|
||||
EXPECT_EQ("EMIT vp<%4> = mul vp<%2> vp<%1>", I4Dump);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue