[RegisterBankInfo] Ignore InstrMappings that create impossible to repair operands
authorTom Stellard <tstellar@redhat.com>
Wed, 25 Jul 2018 03:08:35 +0000 (03:08 +0000)
committerTom Stellard <tstellar@redhat.com>
Wed, 25 Jul 2018 03:08:35 +0000 (03:08 +0000)
commit179757ef054baabf09053b189ee4f9ea4e0e3c7f
tree54dee7fe1ecf79f8eb8f2085deee75300f4a8d93
parent47e5fcba57135025124192626dcb11d9578e4860
[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
llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp