Do not use MRI::getMaxLaneMaskForVReg as a mask covering whole register
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 29 Aug 2016 13:15:35 +0000 (13:15 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 29 Aug 2016 13:15:35 +0000 (13:15 +0000)
commit0a955d6dcb8108d7a4fdd9aec0f46fab5e447230
tree88b8dfb2696ae1b59a89e0b0372729c4c4306320
parent5d3f71f721273e17412dcb3a1726235aabc65651
Do not use MRI::getMaxLaneMaskForVReg as a mask covering whole register

MRI::getMaxLaneMaskForVReg does not always cover the whole register.
For example, on X86 the upper 16 bits of EAX cannot be accessed via
any subregister. Consequently, there is no lane mask that only covers
that part of EAX. The getMaxLaneMaskForVReg will return the union of
the lane masks for all subregisters, and in case of EAX, that union
will not cover the upper 16 bits.

This fixes https://llvm.org/bugs/show_bug.cgi?id=29132

llvm-svn: 279969
llvm/lib/CodeGen/LiveRangeCalc.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/X86/live-range-nosubreg.ll [new file with mode: 0644]