AMDGPU/SI: Add implicit register operands in the correct order.
authorAlex Lorenz <arphaman@gmail.com>
Fri, 31 Jul 2015 23:30:09 +0000 (23:30 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 31 Jul 2015 23:30:09 +0000 (23:30 +0000)
commitb4d0d6a345d76c9d03fe4c595dd93bb89e1065c3
tree2eadeaf544e6116427b484295c830d926f400a65
parent59ed5919cd7c6cefbd5d77ee65704aafbe158dab
AMDGPU/SI: Add implicit register operands in the correct order.

This commit fixes a bug in the class 'SIInstrInfo' where the implicit register
machine operands were added to a machine instruction in an incorrect order -
the implicit uses were added before the implicit defs.

I found this bug while working on moving the implicit register operand
verification code from the MIR parser to the machine verifier.

This commit also makes the method 'addImplicitDefUseOperands' in the machine
instruction class public so that it can be reused in the 'SIInstrInfo' class.

Reviewers: Matt Arsenault

Differential Revision: http://reviews.llvm.org/D11689

llvm-svn: 243799
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/test/CodeGen/AMDGPU/si-instr-info-correct-implicit-operands.ll [new file with mode: 0644]