diff options
author | Tom Stellard <[email protected]> | 2012-08-21 19:30:26 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-08-23 15:00:47 +0000 |
commit | 3a7a56e7aa56bc6cb847c241ef6bd749713ae6e1 (patch) | |
tree | 928bde6156b305c69e2bb067e9b95fc6ed9a203a /src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp | |
parent | bee2edbf3d2da2c2351c70e56da0dca205caa8ea (diff) |
radeon/llvm: Encapsulate setting of MachineOperand flags
MachineOperand flags will be removed soon, so it is convienent to
have only one function that modifies them.
Diffstat (limited to 'src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp b/src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp index 9f1b8168a65..2c19437e2be 100644 --- a/src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp +++ b/src/gallium/drivers/radeon/R600ExpandSpecialInstrs.cpp @@ -146,14 +146,13 @@ bool R600ExpandSpecialInstrsPass::runOnMachineFunction(MachineFunction &MF) { } else { Opcode = MI.getOpcode(); } - MachineOperand NewDstOp = MachineOperand::CreateReg(DstReg, true); - NewDstOp.addTargetFlag(Flags); - - BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(Opcode)) - .addOperand(NewDstOp) - .addReg(Src0) - .addReg(Src1) - ->setIsInsideBundle(Chan != 0); + MachineInstr *NewMI = + BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(Opcode), DstReg) + .addReg(Src0) + .addReg(Src1); + + NewMI->setIsInsideBundle(Chan != 0); + TII->AddFlag(NewMI, 0, Flags); } MI.eraseFromParent(); } |