diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-12-20 22:33:53 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-12-20 22:33:53 +0000 |
commit | 0cee2045c994645e913eebaaa39461e3005f2c79 (patch) | |
tree | 5937a6fec3f47f58cf2abaad5befd2e1ac146a93 /llvm/lib/Target/Mips | |
parent | 4eda145c7f7d9613bca33606943ca34f29ee49e6 (diff) | |
download | bcm5719-llvm-0cee2045c994645e913eebaaa39461e3005f2c79.tar.gz bcm5719-llvm-0cee2045c994645e913eebaaa39461e3005f2c79.zip |
Add patterns for matching extloads with 64-bit address. The patterns are enabled
only when the target ABI is N64.
llvm-svn: 147001
Diffstat (limited to 'llvm/lib/Target/Mips')
-rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.td | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td index 23444dc4a56..8a39e69ab2e 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.td +++ b/llvm/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)>, |