summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index fc04f4e8a55..4890d45a6d3 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -163,7 +163,9 @@ uint64_t RegBankSelect::getRepairCost(
// the repairing.
if (MO.isDef())
std::swap(CurRegBank, DesiredRegBrank);
- unsigned Cost = RBI->copyCost(*DesiredRegBrank, *CurRegBank);
+ unsigned Cost =
+ RBI->copyCost(*DesiredRegBrank, *CurRegBank,
+ RegisterBankInfo::getSizeInBits(MO.getReg(), *MRI, *TRI));
// TODO: use a dedicated constant for ImpossibleCost.
if (Cost != UINT_MAX)
return Cost;
OpenPOWER on IntegriCloud