[AArch64] Keep flags on condition vreg when instantiating a CB branch.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 7 Nov 2014 02:50:00 +0000 (02:50 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 7 Nov 2014 02:50:00 +0000 (02:50 +0000)
commit75da31ff156af209b040d14f04ed92f9cc38ba3f
treee55547a8a22b8ea2648681a0579f128df09fa6a2
parent3f4021398e14dd4b8aee4cb5b963a111b9c5cc4e
[AArch64] Keep flags on condition vreg when instantiating a CB branch.

Reversing a CB* instruction used to drop the flags on the condition. On the
included testcase, this lead to a read from an undefined vreg.
Using addOperand keeps the flags, here <undef>.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221507 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
test/CodeGen/AArch64/br-undef-cond.ll [new file with mode: 0644]