aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-12-20 22:33:53 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-12-20 22:33:53 +0000
commitab05b6c227a547d2bbc36e808e967a1ed2bc55bb (patch)
treebc0b122facc46e10206e36601b3f6e2c6a76573b /lib/Target/Mips
parent3cbe43fe69680df772d83947ced97ca445861213 (diff)
downloadexternal_llvm-ab05b6c227a547d2bbc36e808e967a1ed2bc55bb.zip
external_llvm-ab05b6c227a547d2bbc36e808e967a1ed2bc55bb.tar.gz
external_llvm-ab05b6c227a547d2bbc36e808e967a1ed2bc55bb.tar.bz2
Add patterns for matching extloads with 64-bit address. The patterns are enabled
only when the target ABI is N64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.td18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td
index 23444dc..8a39e69 100644
--- a/lib/Target/Mips/MipsInstrInfo.td
+++ b/lib/Target/Mips/MipsInstrInfo.td
@@ -1008,11 +1008,19 @@ def : WrapperPat<tglobaltlsaddr, ADDiu, GP>;
def : Pat<(not CPURegs:$in),
(NOR CPURegs:$in, ZERO)>;
-// extended load and stores
-def : Pat<(extloadi1 addr:$src), (LBu addr:$src)>;
-def : Pat<(extloadi8 addr:$src), (LBu addr:$src)>;
-def : Pat<(extloadi16_a addr:$src), (LHu addr:$src)>;
-def : Pat<(extloadi16_u addr:$src), (ULHu addr:$src)>;
+// extended loads
+let Predicates = [NotN64] in {
+ def : Pat<(i32 (extloadi1 addr:$src)), (LBu addr:$src)>;
+ def : Pat<(i32 (extloadi8 addr:$src)), (LBu addr:$src)>;
+ def : Pat<(i32 (extloadi16_a addr:$src)), (LHu addr:$src)>;
+ def : Pat<(i32 (extloadi16_u addr:$src)), (ULHu addr:$src)>;
+}
+let Predicates = [IsN64] in {
+ def : Pat<(i32 (extloadi1 addr:$src)), (LBu_P8 addr:$src)>;
+ def : Pat<(i32 (extloadi8 addr:$src)), (LBu_P8 addr:$src)>;
+ def : Pat<(i32 (extloadi16_a addr:$src)), (LHu_P8 addr:$src)>;
+ def : Pat<(i32 (extloadi16_u addr:$src)), (ULHu_P8 addr:$src)>;
+}
// peepholes
def : Pat<(store (i32 0), addr:$dst), (SW ZERO, addr:$dst)>,