We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adcfd3b commit abc5964Copy full SHA for abc5964
llvm/lib/Target/AIE/AIEPostSelectOptimize.cpp
@@ -116,7 +116,8 @@ class PhysRegCopyTracker {
116
/// If it exists, return a virtual register that holds a copy of \p PhysReg.
117
std::optional<Register> getVirtualCopy(MCRegister PhysReg) const {
118
if (auto It = LastAssigns.find(PhysReg); It != LastAssigns.end())
119
- return std::get<Register>(It->second);
+ if (std::holds_alternative<Register>(It->second))
120
+ return std::get<Register>(It->second);
121
122
return {};
123
}
0 commit comments