[PATCH] [AArch64] Keep flags on the condition when instantiating a CB branch.

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Nov 6 18:00:56 PST 2014


Hi t.p.northover,

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.

Also, I'm not sure it's a good thing that the idiom:
    BuildMI(...).addReg(MO->getReg())
is preferred to:
    BuildMI(...).addOperand(MO)

Here this actually makes a difference, I'm wondering if there are other places where the difference is more important than some missing undef.

http://reviews.llvm.org/D6159

Files:
  lib/Target/AArch64/AArch64InstrInfo.cpp
  test/CodeGen/AArch64/br-undef-cond.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6159.15903.patch
Type: text/x-patch
Size: 1503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141107/148b94ff/attachment.bin>


More information about the llvm-commits mailing list