TableGen: Fix register class lane masks being too conservative.
authorMatthias Braun <matze@braunis.de>
Wed, 18 Mar 2015 17:56:09 +0000 (17:56 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 18 Mar 2015 17:56:09 +0000 (17:56 +0000)
commit8b41add6ca68108ddee98b99c5213215ca82eba9
treeec3d98e9edad788c09dd611fa3e330ed1fdd591f
parentdf600f804907d478abc9968b1aa49dad3f21ce75
TableGen: Fix register class lane masks being too conservative.

When calculating the lanemask of a register class we have to include the
masks of subregisters supported by any of the class members, not just
the ones supported by all class members.

This fixes problems when coalescing towards a subclass with additional
subregisters available.

The attached testcase works fine as is, but does crash if you enable
subregister liveness on x86 without this change applied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232652 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/coalescer-subreg.ll [new file with mode: 0644]
utils/TableGen/CodeGenRegisters.cpp