diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2018-07-21 16:16:03 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2018-07-21 16:16:03 +0000 |
| commit | ecd1e0afdd30c136689c13b5b5ef16482b718753 (patch) | |
| tree | bc7eaecfa4cd42c670ed4af03d2357b85f776109 /llvm/lib/Target/Mips | |
| parent | c93b870c54303806371ba9132af686e88e256a78 (diff) | |
| download | bcm5719-llvm-ecd1e0afdd30c136689c13b5b5ef16482b718753.tar.gz bcm5719-llvm-ecd1e0afdd30c136689c13b5b5ef16482b718753.zip | |
[mips] Move out the WrapperPat declaration from the NotInMicroMips predicate
This is a follow-up to the rL335185. Those commit adds some WrapperPat
patterns for microMIPS target. But declaration of the WrapperPat class
is under the NotInMicroMips predicate and microMIPS patterns cannot be
selected because predicate (Subtarget->inMicroMipsMode()) &&
(!Subtarget->inMicroMipsMode()) is always false.
This change move out the WrapperPat class declaration from the
NotInMicroMips predicate and enables microMIPS WrapperPat patterns.
Differential revision: https://reviews.llvm.org/D49533
llvm-svn: 337646
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.td | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td index c319ab15607..67ab91d4578 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.td +++ b/llvm/lib/Target/Mips/MipsInstrInfo.td @@ -3098,6 +3098,10 @@ multiclass MipsHiLoRelocs<Instruction Lui, Instruction Addiu, (Addiu GPROpnd:$hi, tglobaltlsaddr:$lo)>; } +// wrapper_pic +class WrapperPat<SDNode node, Instruction ADDiuOp, RegisterClass RC>: + MipsPat<(MipsWrapper RC:$gp, node:$in), (ADDiuOp RC:$gp, node:$in)>; + let AdditionalPredicates = [NotInMicroMips] in { defm : MipsHiLoRelocs<LUi, ADDiu, ZERO, GPR32Opnd>, ISA_MIPS1; @@ -3111,11 +3115,6 @@ let AdditionalPredicates = [NotInMicroMips] in { def : MipsPat<(add GPR32:$gp, (MipsGPRel tconstpool:$in)), (ADDiu GPR32:$gp, tconstpool:$in)>, ISA_MIPS1, ABI_NOT_N64; - // wrapper_pic - class WrapperPat<SDNode node, Instruction ADDiuOp, RegisterClass RC>: - MipsPat<(MipsWrapper RC:$gp, node:$in), - (ADDiuOp RC:$gp, node:$in)>; - def : WrapperPat<tglobaladdr, ADDiu, GPR32>, ISA_MIPS1; def : WrapperPat<tconstpool, ADDiu, GPR32>, ISA_MIPS1; def : WrapperPat<texternalsym, ADDiu, GPR32>, ISA_MIPS1; |

