diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-11-14 19:06:14 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-11-14 19:06:14 +0000 |
commit | 788dc0f4e51628651850ca3c68cccd713b694052 (patch) | |
tree | 5a425637c3c0e0f083cab5b64042adff62f26164 | |
parent | 4961709688be9e21985e413e296e84e391ae92ac (diff) | |
download | external_llvm-788dc0f4e51628651850ca3c68cccd713b694052.zip external_llvm-788dc0f4e51628651850ca3c68cccd713b694052.tar.gz external_llvm-788dc0f4e51628651850ca3c68cccd713b694052.tar.bz2 |
32-to-64-bit extended load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144554 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Mips/Mips64InstrInfo.td | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/Target/Mips/Mips64InstrInfo.td b/lib/Target/Mips/Mips64InstrInfo.td index 51b9bf9..3c97241 100644 --- a/lib/Target/Mips/Mips64InstrInfo.td +++ b/lib/Target/Mips/Mips64InstrInfo.td @@ -219,11 +219,16 @@ def : Pat<(i64 immZExt16:$in), def : Pat<(i64 imm:$imm), (ORi64 (LUi64 (HI16 imm:$imm)), (LO16 imm:$imm))>; -// zextloadi32_u -def : Pat<(zextloadi32_u addr:$a), (DSRL32 (DSLL32 (ULW64_P8 addr:$a), 0), 0)>, - Requires<[IsN64]>; -def : Pat<(zextloadi32_u addr:$a), (DSRL32 (DSLL32 (ULW64 addr:$a), 0), 0)>, - Requires<[NotN64]>; +// extended loads +let Predicates = [NotN64] in { + def : Pat<(extloadi32_a addr:$a), (DSRL32 (DSLL32 (LW64 addr:$a), 0), 0)>; + def : Pat<(zextloadi32_u addr:$a), (DSRL32 (DSLL32 (ULW64 addr:$a), 0), 0)>; +} +let Predicates = [IsN64] in { + def : Pat<(extloadi32_a addr:$a), (DSRL32 (DSLL32 (LW64_P8 addr:$a), 0), 0)>; + def : Pat<(zextloadi32_u addr:$a), + (DSRL32 (DSLL32 (ULW64_P8 addr:$a), 0), 0)>; +} // hi/lo relocs def : Pat<(i64 (MipsLo tglobaladdr:$in)), (DADDiu ZERO_64, tglobaladdr:$in)>; |