Open akcheung opened 3 years ago
This is a bit weird, and it's because of the order operands are stored for a branch instruction in the underlying LLVM BranchInst
class:
/// Ops list - Branches are strange. The operands are ordered:
/// [Cond, FalseDest,] TrueDest. This makes some accessors faster because
/// they don't have to check for cond/uncond branchness.
The code above prints
operands: ['tmp3', 'bb5', 'bb4']
for the first branch instruction. Is that intentional? I was thinking that it should printoperands: ['tmp3', 'bb4', 'bb5']
instead.