llvm.org GIT mirror llvm / 3fdadfc
Represent tADDspi and tSUBspi as two-address instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33551 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
2 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
284284 "add $dst, pc, $rhs * 4", []>;
285285 def tADDrSPi : TI<(ops GPR:$dst, GPR:$sp, i32imm:$rhs),
286286 "add $dst, $sp, $rhs * 4", []>;
287 def tADDspi : TI<(ops GPR:$sp, i32imm:$rhs),
288 "add $sp, $rhs * 4", []>;
287 def tADDspi : TIt<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
288 "add $dst, $rhs * 4", []>;
289289
290290
291291 def tAND : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs),
412412 "sub $dst, $lhs, $rhs",
413413 [(set GPR:$dst, (sub GPR:$lhs, GPR:$rhs))]>;
414414
415 def tSUBspi : TI<(ops GPR:$sp, i32imm:$rhs),
416 "sub $sp, $rhs * 4", []>;
415 def tSUBspi : TIt<(ops GPR:$dst, GPR:$lhs, i32imm:$rhs),
416 "sub $dst, $rhs * 4", []>;
417417
418418 def tSXTB : TI<(ops GPR:$dst, GPR:$src),
419419 "sxtb $dst, $src",
377377 Bytes -= ThisVal;
378378 // Build the new tADD / tSUB.
379379 if (isTwoAddr)
380 BuildMI(MBB, MBBI, TII.get(Opc), DestReg).addImm(ThisVal);
380 BuildMI(MBB, MBBI, TII.get(Opc), DestReg).addReg(DestReg).addImm(ThisVal);
381381 else {
382382 BuildMI(MBB, MBBI, TII.get(Opc), DestReg).addReg(BaseReg).addImm(ThisVal);
383383 BaseReg = DestReg;