Skip to content

SPIRV CI: 5 pre-existing debug-info lit failures on amd-staging (LLVM verifier/llc drift) #258

Description

@lamb-j

Summary

The SPIRV CI (spirv-ci.yml) Test SPIRV translator lit job (check-amd-llvm-spirv) has 5 pre-existing failing lit tests on amd-staging. They are not regressions — they fail identically on both PR head and the amd-staging baseline, so the "new failures" gate stays green and they are currently informational. This issue tracks fixing/triaging them.

Latest observed run: ROCm/SPIRV-LLVM-Translator run 29958131088check-amd-llvm-spirv: 1113 discovered, 998 passed, 5 failed, 6 XFAIL, 104 unsupported.

Failing tests

Test Failure stage Root cause
test/DebugInfo/LocalAddressSpace.ll llvm-as verifier invalid retained nodes
test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll llvm-as verifier invalid retained nodes
test/DebugInfo/X86/dimodule-external-fortran.ll llvm-as verifier invalid retained nodes
test/DebugInfo/X86/DW_AT_specification.ll llvm-as verifier invalid retained nodes
test/transcoding/dbginfo-bug-on-bool-converts.ll llc / CHECK-LLC codegen output drift

Root cause

These are LLVM version drift failures, not translator code bugs. All 5 test .ll files are byte-identical to KhronosGroup/SPIRV-LLVM-Translator main (0 diff vs upstream/main). The failures occur in LLVM tooling (llvm-as, llc) before/around the translator, driven by the newer LLVM that amd-staging builds against.

Bucket 1 — invalid retained nodes (4 tests): llvm-as fails with:

invalid retained nodes, expected DILocalVariable, DILabel, DIImportedEntity or DIType
!13 = !{!0}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
warning: ignoring invalid debug info in <stdin>

The stale fixtures place a DIGlobalVariableExpression in a DISubprogram's retainedNodes. Current LLVM's verifier rejects this and drops the debug info, so the downstream CHECK-SPIRV / CHECK patterns then report "expected string not found in input."

Bucket 2 — llc output drift (1 test): transcoding/dbginfo-bug-on-bool-converts.ll fails at CHECK-LLC (llc DWARF output no longer matches the expected pattern). No retained-nodes error — this is separate codegen-output drift.

Upstream status

The test inputs match Khronos main exactly, so upstream Khronos CI (paired with a compatible LLVM) passes them. They only fail here because amd-staging's LLVM verifier is stricter than the LLVM upstream Khronos pins against. Fixing forward (updating the fixtures' debug-info metadata to the current schema, and refreshing the llc CHECK lines) belongs in this repo's amd-staging; the changes are candidates to send upstream as well.

Proposed next steps

  • Update the 4 retained-nodes fixtures so retainedNodes holds only verifier-accepted node kinds (move the DIGlobalVariableExpression out, per current LLVM debug-info schema).
  • Regenerate the expected CHECK-LLC lines for dbginfo-bug-on-bool-converts.ll against current llc.
  • Consider upstreaming the fixture updates to KhronosGroup/SPIRV-LLVM-Translator.
  • Once resolved, these can be promoted from informational back to fully clean.

Notes

  • Not a PR regression; gate is "new failures vs baseline" only.
  • The Test LLVM SPIRV codegen suite (check-llvm-codegen-spirv) is clean (1127/1130 pass, rest unsupported).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions