Commute the internal flag on MachineOperands.
authorPete Cooper <peter_cooper@apple.com>
Thu, 30 Apr 2015 23:14:14 +0000 (23:14 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 30 Apr 2015 23:14:14 +0000 (23:14 +0000)
commita4f66d25fcbf751135e3d2059d46205c38f68d6d
tree4e604a557258722a4a3828617e9a2dd44bb39a6a
parent0c54b7abc727d38fe9efc99a6d1092ccb6cf1835
Commute the internal flag on MachineOperands.

When commuting a thumb instruction in the size reduction pass, thumb
instructions are represented as a bundle and so some operands may be marked
as internal.  The internal flag has to move with the operand when commuting.

This test is sensitive to register allocation so can't specifically check that
this error was happening, but so long as it continues to pass with -verify then
hopefully its still ok.

rdar://problem/20752113

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236282 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInstrInfo.cpp
test/CodeGen/ARM/thumb2-size-reduction-internal-flags.ll [new file with mode: 0644]