summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-02-12 12:21:55 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-02-12 12:21:55 +0000
commit0874cf5e6224760ab86eca55cd882d1f147583d8 (patch)
tree99713f2fa9883dfddb5e93b5518c602714f6912b /llvm/lib/Target/Mips
parent4ba5817b8b7fe5f136c8f95287e02eeaa69d630b (diff)
downloadbcm5719-llvm-0874cf5e6224760ab86eca55cd882d1f147583d8.tar.gz
bcm5719-llvm-0874cf5e6224760ab86eca55cd882d1f147583d8.zip
[mips] Fix 'l' constraint handling for types smaller than 32 bits
In case of correct using of the 'l' constraint llvm now generates valid code; otherwise it shows an error message. Initially these triggers an assertion. This commit is the same as r324869 with fixed the test's file name. llvm-svn: 324885
Diffstat (limited to 'llvm/lib/Target/Mips')
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index ba05b0f48df..3d383b3dfe3 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -3868,7 +3868,7 @@ MipsTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
return std::make_pair(0U, nullptr);
case 'l': // use the `lo` register to store values
// that are no bigger than a word
- if (VT == MVT::i32)
+ if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8)
return std::make_pair((unsigned)Mips::LO0, &Mips::LO32RegClass);
return std::make_pair((unsigned)Mips::LO0_64, &Mips::LO64RegClass);
case 'x': // use the concatenated `hi` and `lo` registers
OpenPOWER on IntegriCloud