diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-08-02 19:23:33 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-08-02 19:23:33 +0000 |
commit | 5e795097b081390a7172beeffad7e65c5150214f (patch) | |
tree | af0f1b1638126fe25e43bc517a3a3b0bbd86ba20 /lib/Target/Mips | |
parent | 787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c (diff) | |
download | external_llvm-5e795097b081390a7172beeffad7e65c5150214f.zip external_llvm-5e795097b081390a7172beeffad7e65c5150214f.tar.gz external_llvm-5e795097b081390a7172beeffad7e65c5150214f.tar.bz2 |
[mips] Expand vector truncating stores and extending loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/MipsSEISelLowering.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsSEISelLowering.cpp b/lib/Target/Mips/MipsSEISelLowering.cpp index 8b5a874..58c8e7c 100644 --- a/lib/Target/Mips/MipsSEISelLowering.cpp +++ b/lib/Target/Mips/MipsSEISelLowering.cpp @@ -53,6 +53,20 @@ MipsSETargetLowering::MipsSETargetLowering(MipsTargetMachine &TM) setOperationAction(ISD::BITCAST, VecTys[i], Legal); } + // Expand all truncating stores and extending loads. + unsigned FirstVT = (unsigned)MVT::FIRST_VECTOR_VALUETYPE; + unsigned LastVT = (unsigned)MVT::LAST_VECTOR_VALUETYPE; + + for (unsigned VT0 = FirstVT; VT0 <= LastVT; ++VT0) { + for (unsigned VT1 = FirstVT; VT1 <= LastVT; ++VT1) + setTruncStoreAction((MVT::SimpleValueType)VT0, + (MVT::SimpleValueType)VT1, Expand); + + setLoadExtAction(ISD::SEXTLOAD, (MVT::SimpleValueType)VT0, Expand); + setLoadExtAction(ISD::ZEXTLOAD, (MVT::SimpleValueType)VT0, Expand); + setLoadExtAction(ISD::EXTLOAD, (MVT::SimpleValueType)VT0, Expand); + } + setTargetDAGCombine(ISD::SHL); setTargetDAGCombine(ISD::SRA); setTargetDAGCombine(ISD::SRL); |