]> granicus.if.org Git - llvm/commit
[RegisterBankInfo] Emit proper type for remapped registers.
authorQuentin Colombet <qcolombet@apple.com>
Sat, 28 Jan 2017 02:23:48 +0000 (02:23 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Sat, 28 Jan 2017 02:23:48 +0000 (02:23 +0000)
commit0a5eca70618ce6bac3671758f747021ede4469b0
treed633ab07313ab21544ab3622f6db67f936bafdf9
parent4fcfd74d0696406bda90e69f619710f639bb3574
[RegisterBankInfo] Emit proper type for remapped registers.

When the OperandsMapper creates virtual registers, it used to just create
plain scalar register with the right size. This may confuse the
instruction selector because we lose the information of the instruction
using those registers what supposed to do. The MachineVerifier complains
about that already.

With this patch, the OperandsMapper still creates plain scalar register,
but the expectation is for the mapping function to remap the type
properly. The default mapping function has been updated to do that.

rdar://problem/30231850

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293362 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir