Commit cc4259a
committed
Make the operand ordering of conditional branches less confusing.
In LLVM, a conditional branch (in textual representation) looks like:
```
br %cond, bb-if-true, bb-if-false
```
But under the hood, the operands are stored in a different order:
cond, bb-if-false, bb-if-true
This led us to invert all of our guards in our traces!
Rather than inherit this oddity in our IRs, this change re-jiggles the
operand ordering during lowering to make it how you might expect.1 parent 69a5b5a commit cc4259a
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
457 | 472 | | |
| 473 | + | |
458 | 474 | | |
459 | 475 | | |
460 | 476 | | |
| |||
0 commit comments