Pick a conservative register class when creating a small live range for remat.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 03:54:44 +0000 (03:54 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 03:54:44 +0000 (03:54 +0000)
commit312babc93ff837d268b83ae829fdb122f40c34c8
tree281d8681f32530b4f1ea2fed8bc66ca1bed4fa38
parente4345c9977e65b14fa4b93d19c7e67a7b15f7f40
Pick a conservative register class when creating a small live range for remat.

The rematerialized instruction may require a more constrained register class
than the register being spilled. In the test case, the spilled register has been
inflated to the DPR register class, but we are rematerializing a load of the
ssub_0 sub-register which only exists for DPR_VFP2 registers.

The register class is reinflated after spilling, so the conservative choice is
only temporary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128610 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InlineSpiller.cpp
test/CodeGen/ARM/crash-greedy.ll [new file with mode: 0644]