summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorVadzim Dambrouski <pftbest@gmail.com>2017-04-26 00:33:59 +0000
committerVadzim Dambrouski <pftbest@gmail.com>2017-04-26 00:33:59 +0000
commitd91fb8c367186cac1b55be88314385df1959ef10 (patch)
tree37f76f97586cb4535ef3fe7cfd61391c7322a0c2 /llvm/lib
parent77deb5c7880c18c2e1112e508c1091bc3d872516 (diff)
downloadbcm5719-llvm-d91fb8c367186cac1b55be88314385df1959ef10.tar.gz
bcm5719-llvm-d91fb8c367186cac1b55be88314385df1959ef10.zip
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/MSP430/MSP430InstrInfo.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.td b/llvm/lib/Target/MSP430/MSP430InstrInfo.td
index c0c29b99223..22fc2474fae 100644
--- a/llvm/lib/Target/MSP430/MSP430InstrInfo.td
+++ b/llvm/lib/Target/MSP430/MSP430InstrInfo.td
@@ -122,6 +122,7 @@ def ADJCALLSTACKUP : Pseudo<(outs), (ins i16imm:$amt1, i16imm:$amt2),
}
let usesCustomInserter = 1 in {
+ let Uses = [SR] in {
def Select8 : Pseudo<(outs GR8:$dst), (ins GR8:$src, GR8:$src2, i8imm:$cc),
"# Select8 PSEUDO",
[(set GR8:$dst,
@@ -130,6 +131,7 @@ let usesCustomInserter = 1 in {
"# Select16 PSEUDO",
[(set GR16:$dst,
(MSP430selectcc GR16:$src, GR16:$src2, imm:$cc))]>;
+ }
let Defs = [SR] in {
def Shl8 : Pseudo<(outs GR8:$dst), (ins GR8:$src, GR8:$cnt),
"# Shl8 PSEUDO",
OpenPOWER on IntegriCloud