diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2016-04-22 13:19:22 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2016-04-22 13:19:22 +0000 |
commit | 5676d06aefe9cda80b7e65b8a700a2896970e4f5 (patch) | |
tree | 2cb1379380e903c6128644517a39ce72ec3efde3 /llvm/lib/Target | |
parent | de9b8b40aafda832342b2dca3a707579e4388688 (diff) | |
download | bcm5719-llvm-5676d06aefe9cda80b7e65b8a700a2896970e4f5.tar.gz bcm5719-llvm-5676d06aefe9cda80b7e65b8a700a2896970e4f5.zip |
[mips] Fix select patterns for MIPS64
When targetting MIPS64R6 some of the patterns for select were guarded by a
broken predicate. The predicate was supposed to test if a constant value
could fit in a 16 bit zero-extended field. Instead the value was tested to
fit in a 16 bit sign-extended field. For negative constants of native word
width this resulted in wrong code generation.
Reviewers: vkalintiris, dsanders
Differential Review: http://reviews.llvm.org/D19378
llvm-svn: 267151
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Mips/Mips64InstrInfo.td | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/Mips64InstrInfo.td b/llvm/lib/Target/Mips/Mips64InstrInfo.td index 93a10c6cd54..b95cdc86f9e 100644 --- a/llvm/lib/Target/Mips/Mips64InstrInfo.td +++ b/llvm/lib/Target/Mips/Mips64InstrInfo.td @@ -29,7 +29,7 @@ def immSExt10_64 : PatLeaf<(i64 imm), [{ return isInt<10>(N->getSExtValue()); }]>; def immZExt16_64 : PatLeaf<(i64 imm), - [{ return isInt<16>(N->getZExtValue()); }]>; + [{ return isUInt<16>(N->getZExtValue()); }]>; def immZExt5_64 : ImmLeaf<i64, [{ return Imm == (Imm & 0x1f); }]>; |