OSDN Git Service

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)
commitadef5a69683e4fd7966ae01a927387a8a23a7523
treeea5d1d3ea0cf32b5f60018ce90745b5da16fd983
parenta8fa4024a0f52234ff34cbf70eea640f389c9f38
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279969 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveRangeCalc.cpp
lib/CodeGen/MachineVerifier.cpp
test/CodeGen/X86/live-range-nosubreg.ll [new file with mode: 0644]