diff options
| author | Tom Stellard <tstellar@redhat.com> | 2018-07-25 03:08:35 +0000 |
|---|---|---|
| committer | Tom Stellard <tstellar@redhat.com> | 2018-07-25 03:08:35 +0000 |
| commit | 179757ef054baabf09053b189ee4f9ea4e0e3c7f (patch) | |
| tree | 54dee7fe1ecf79f8eb8f2085deee75300f4a8d93 /llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | |
| parent | 47e5fcba57135025124192626dcb11d9578e4860 (diff) | |
| download | bcm5719-llvm-179757ef054baabf09053b189ee4f9ea4e0e3c7f.tar.gz bcm5719-llvm-179757ef054baabf09053b189ee4f9ea4e0e3c7f.zip | |
[RegisterBankInfo] Ignore InstrMappings that create impossible to repair operands
Summary:
This is a follow-up to r303043. In computeMapping(), we need to disqualify an
InstrMapping if it would be impossible to repair one of the registers in the
instruction to match the mapping.
This change is needed in order to be able to define an instruction
mapping for G_SELECT for the AMDGPU target and will be tested
by test/CodeGen/AMDGPU/GlobalISel/regbankselect-select.mir
Reviewers: ab, qcolombet, t.p.northover, dsanders
Reviewed By: qcolombet
Subscribers: tpr, llvm-commits
Differential Revision: https://reviews.llvm.org/D49735
llvm-svn: 337882
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index 79fa888357d..9e2d48d1dc4 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -475,7 +475,7 @@ RegBankSelect::MappingCost RegBankSelect::computeMapping( // This is an impossible to repair cost. if (RepairCost == std::numeric_limits<unsigned>::max()) - continue; + return MappingCost::ImpossibleCost(); // Bias used for splitting: 5%. const uint64_t PercentageForBias = 5; |

