Description
In #70787, a new mandatory BooleanLiteralFolding pass was added. That patch also changed true and false literals in some tests to 1 == 1 and 1 == 0. For AutoDiff tests, that change was also complemented with such comments:
// TODO: cannot use literal `true` because it crashes
// TODO: cannot use literal `false` because it crashes
It looks like that no other info about the crash is present.
Need to investigate if the crash was fixed. As for now:
- Just changing
1 == 1/1 == 0 back to true/false does not cause crashes.
- With
-Xllvm -debug-only=differentiation, we can see that with boolean literals, constant folding is performed, while with 1 == 1/1 == 0 a conditional jump is present.
- With
-Xllvm -sil-disable-pass=boolean-literal-folding, the conditional jump is present for boolean literals as well. This does not cause any crash.
Additional information
See also #77760