File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -459,16 +459,17 @@ class YkIRWriter {
459
459
//
460
460
// Note that in LLVM IR, the operands are ordered (despite the order they
461
461
// appear in the language reference): cond, if-false, if-true. We
462
- // re-order those during lowering to avoid confusion.
462
+ // use `getSuccessor()`, so as to re-order those during lowering to avoid
463
+ // confusion.
463
464
//
464
465
// num_operands:
465
466
OutStreamer.emitInt32 (3 );
466
467
// OPERAND 0: condition.
467
468
serialiseOperand (I, VLMap, I->getOperand (0 ));
468
469
// OPERAND 1: block to go to if true.
469
- serialiseOperand (I, VLMap, I->getOperand ( 2 ));
470
+ serialiseOperand (I, VLMap, I->getSuccessor ( 0 ));
470
471
// OPERAND 2: block to go to if false.
471
- serialiseOperand (I, VLMap, I->getOperand (1 ));
472
+ serialiseOperand (I, VLMap, I->getSuccessor (1 ));
472
473
}
473
474
InstIdx++;
474
475
}
You can’t perform that action at this time.
0 commit comments