diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2012-06-13 20:33:18 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-06-13 20:33:18 +0000 |
| commit | df5205ef3d5eef89c539e82a5e99100397d821c6 (patch) | |
| tree | 3a63f588d17262b86af461ba41fcc6be4a99240b /llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | |
| parent | 8acadcb84bcb70e1eea08cf261a2f4f5973578c3 (diff) | |
| download | bcm5719-llvm-df5205ef3d5eef89c539e82a5e99100397d821c6.tar.gz bcm5719-llvm-df5205ef3d5eef89c539e82a5e99100397d821c6.zip | |
Implement a DAGCombine in MipsISelLowering.cpp which transforms the following
pattern:
(add v0, (add v1, abs_lo(tjt))) => (add (add v0, v1), abs_lo(tjt))
"tjt" is a TargetJumpTable node.
llvm-svn: 158419
Diffstat (limited to 'llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp index 62f7cdea3c0..b0513c31278 100644 --- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -335,11 +335,11 @@ SelectAddr(SDNode *Parent, SDValue Addr, SDValue &Base, SDValue &Offset) { // lui $2, %hi($CPI1_0) // lwc1 $f0, %lo($CPI1_0)($2) if (Addr.getOperand(1).getOpcode() == MipsISD::Lo) { - SDValue LoVal = Addr.getOperand(1); - if (isa<ConstantPoolSDNode>(LoVal.getOperand(0)) || - isa<GlobalAddressSDNode>(LoVal.getOperand(0))) { + SDValue LoVal = Addr.getOperand(1), Opnd0 = LoVal.getOperand(0); + if (isa<ConstantPoolSDNode>(Opnd0) || isa<GlobalAddressSDNode>(Opnd0) || + isa<JumpTableSDNode>(Opnd0)) { Base = Addr.getOperand(0); - Offset = LoVal.getOperand(0); + Offset = Opnd0; return true; } } |

