aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-12-20 21:50:49 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-12-20 21:50:49 +0000
commitcaace8abdfc42cc23c70372d438e8b6aec4f0058 (patch)
treec75cc656e6053c651c42cce21bbfdf26c0e65ea7 /lib/Target/Mips
parent5b484312c66f8d125c072517947538f301c5a805 (diff)
downloadexternal_llvm-caace8abdfc42cc23c70372d438e8b6aec4f0058.zip
external_llvm-caace8abdfc42cc23c70372d438e8b6aec4f0058.tar.gz
external_llvm-caace8abdfc42cc23c70372d438e8b6aec4f0058.tar.bz2
Add a pattern for matching zero-store with 64-bit address. The pattern is enabled
only when the target ABI is N64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.td5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td
index 5260943..23444dc 100644
--- a/lib/Target/Mips/MipsInstrInfo.td
+++ b/lib/Target/Mips/MipsInstrInfo.td
@@ -1015,7 +1015,10 @@ def : Pat<(extloadi16_a addr:$src), (LHu addr:$src)>;
def : Pat<(extloadi16_u addr:$src), (ULHu addr:$src)>;
// peepholes
-def : Pat<(store (i32 0), addr:$dst), (SW ZERO, addr:$dst)>;
+def : Pat<(store (i32 0), addr:$dst), (SW ZERO, addr:$dst)>,
+ Requires<[NotN64]>;
+def : Pat<(store (i32 0), addr:$dst), (SW_P8 ZERO, addr:$dst)>,
+ Requires<[IsN64]>;
// brcond patterns
multiclass BrcondPats<RegisterClass RC, Instruction BEQOp, Instruction BNEOp,