diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-30 02:14:45 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-30 02:14:45 +0000 |
commit | fd2cd0db97d78e10288bdf0fb915296c68294237 (patch) | |
tree | 985f165d0f7e10a6a7d2e7c69f7640a9baec16b4 /lib/Target/Mips/MipsDSPInstrInfo.td | |
parent | 175f0fd99aaa66fd4268d0f3ff73d6b76332c99f (diff) | |
download | llvm-fd2cd0db97d78e10288bdf0fb915296c68294237.tar.gz llvm-fd2cd0db97d78e10288bdf0fb915296c68294237.tar.bz2 llvm-fd2cd0db97d78e10288bdf0fb915296c68294237.tar.xz |
[mips] Add patterns for DSP indexed load instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDSPInstrInfo.td')
-rw-r--r-- | lib/Target/Mips/MipsDSPInstrInfo.td | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsDSPInstrInfo.td b/lib/Target/Mips/MipsDSPInstrInfo.td index 7ce8cc78f3..3c116e1264 100644 --- a/lib/Target/Mips/MipsDSPInstrInfo.td +++ b/lib/Target/Mips/MipsDSPInstrInfo.td @@ -1258,3 +1258,14 @@ def : EXTR_W_TY1_R2_Pat<MipsEXTR_S_H, EXTRV_S_H>; let AddedComplexity = 20 in def : DSPPat<(i32 (ExtractLOHI ACRegsDSP:$ac, imm:$lohi_idx)), (EXTRACT_SUBREG ACRegsDSP:$ac, imm:$lohi_idx)>; + +// Indexed load patterns. +class IndexedLoadPat<SDPatternOperator LoadNode, Instruction Instr> : + DSPPat<(i32 (LoadNode (add i32:$base, i32:$index))), + (Instr i32:$base, i32:$index)>; + +let AddedComplexity = 20 in { + def : IndexedLoadPat<zextloadi8, LBUX>; + def : IndexedLoadPat<sextloadi16, LHX>; + def : IndexedLoadPat<load, LWX>; +} |