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)
commit3b36533112b03934c58582713e412d85a9855d89
tree11e5b39b75d7c095bf975601690525eb4430fb8d
parent38438bae21aee9bc24276d31f5b3eede81ac1a1d
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.

llvm-svn: 232652
llvm/test/CodeGen/X86/coalescer-subreg.ll [new file with mode: 0644]
llvm/utils/TableGen/CodeGenRegisters.cpp