[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)
commit72001cf287fac7b37009cf0a94065cd06831718d
tree3742501d0d212ca5c7246b0956f7002f93f9d03b
parent2685de10776b28090ee34d89df9dda5b562094ca
[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

llvm-svn: 221507
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/br-undef-cond.ll [new file with mode: 0644]