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 {
459459 //
460460 // Note that in LLVM IR, the operands are ordered (despite the order they
461461 // 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.
463464 //
464465 // num_operands:
465466 OutStreamer.emitInt32 (3 );
466467 // OPERAND 0: condition.
467468 serialiseOperand (I, VLMap, I->getOperand (0 ));
468469 // OPERAND 1: block to go to if true.
469- serialiseOperand (I, VLMap, I->getOperand ( 2 ));
470+ serialiseOperand (I, VLMap, I->getSuccessor ( 0 ));
470471 // OPERAND 2: block to go to if false.
471- serialiseOperand (I, VLMap, I->getOperand (1 ));
472+ serialiseOperand (I, VLMap, I->getSuccessor (1 ));
472473 }
473474 InstIdx++;
474475 }
You can’t perform that action at this time.
0 commit comments