Skip to content

[AutoDiff][test] Investigate if a BooleanLiteralFolding-related crash was fixed #77762

@kovdan01

Description

@kovdan01

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:

  1. Just changing 1 == 1/1 == 0 back to true/false does not cause crashes.
  2. 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.
  3. 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

No one assigned

    Labels

    triage neededThis issue needs more specific labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions