Skip to content

[SM6.9] Prevent GVN from generating illegal integers - #9044

Open
Chris B (llvm-beanz) wants to merge 3 commits into
microsoft:mainfrom
llvm-beanz:gvn-avoid-illegal-ints
Open

Chris B (llvm-beanz) wants to merge 3 commits into
microsoft:mainfrom
llvm-beanz:gvn-avoid-illegal-ints

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

This change is a more complete set of checks to avoid GVN generating invalid integer sizes. We've had a few cases of this previously, but I think this covers the remaining cases in GVN.

Fixes #9040

This change is a more complete set of checks to avoid GVN generating
invalid integer sizes. We've had a few cases of this previously, but I
think this covers the remaining cases in GVN.

Fixes microsoft#9040
Copilot AI balanced review requested due to automatic review settings October 16, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking issues remain; the only finding is a minor release-note label typo.

1 open issue
What changed in this PR

Prevents GVN load forwarding from generating unsupported DXIL integer types, addressing #9040.

Changes:

  • Checks integer widths and directly coerces equal-sized values.
  • Adds regression tests for narrow and wide forwarding cases.
  • Documents the compiler fix in release notes.
File Description
tools/​clang/​test/​DXC/​Passes/​GVN/​dxil_illegal_narrow_integer_size.ll Tests narrow-width legality and valid forwarding.
tools/​clang/​test/​DXC/​Passes/​GVN/​dxil_illegal_integer_size.ll Tests wide-vector forwarding and illegal intermediates.
lib/​Transforms/​Scalar/​GVN.cpp Guards coercions and avoids unnecessary integer intermediates.
docs/​ReleaseNotes.md Documents the GVN fix.

Review effort: Balanced

Comment thread docs/ReleaseNotes.md Outdated
Fixed issues related to GVN load forwarding, shader reflection, and optimizer crashes.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 18, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review identified no blocking issues, and focused regression tests cover the affected paths; tests were not executed.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking issues remain, and regression tests cover the changed coercion and forwarding paths.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

[SM 6.9/6.10] GVN emits invalid i128 for loop-carried float4-to-uint4 forwarding

3 participants