[MSP430] Fix PR32769: Select8 and Select16 need to have SR in Uses.
authorVadzim Dambrouski <pftbest@gmail.com>
Wed, 26 Apr 2017 00:33:59 +0000 (00:33 +0000)
committerVadzim Dambrouski <pftbest@gmail.com>
Wed, 26 Apr 2017 00:33:59 +0000 (00:33 +0000)
commitd91fb8c367186cac1b55be88314385df1959ef10
tree37f76f97586cb4535ef3fe7cfd61391c7322a0c2
parent77deb5c7880c18c2e1112e508c1091bc3d872516
[MSP430] Fix PR32769: Select8 and Select16 need to have SR in Uses.

If Select pseudo instruction doesn't have use SR, then
CMP instructions are being marked as dead and later can be
removed by MachineCSE pass. This leads to incorrect code
generation.

Differential Revision: https://reviews.llvm.org/D32473

llvm-svn: 301372
llvm/lib/Target/MSP430/MSP430InstrInfo.td
llvm/test/CodeGen/MSP430/select-use-sr.ll [new file with mode: 0644]