-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Open
Copy link
Labels
triage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
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 totrue
/false
does not cause crashes. - With
-Xllvm -debug-only=differentiation
, we can see that with boolean literals, constant folding is performed, while with1 == 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
Metadata
Metadata
Assignees
Labels
triage neededThis issue needs more specific labelsThis issue needs more specific labels