Skip to content

[NFC] Rewrite fragile tests - #9001

Merged
Chris B (llvm-beanz) merged 2 commits into
microsoft:mainfrom
llvm-beanz:rewrite-tests
Oct 5, 2026
Merged

Chris B (llvm-beanz) merged 2 commits into
microsoft:mainfrom
llvm-beanz:rewrite-tests

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

These two tests were introduced in PR #7116, but they are fragile to changes in the optimizer. So I've rewritten them as -fcgl tests to isolate them from changes to the optimizer.

Notably PR #7116 contains functional changes only to the Clang CodeGen layer, the other changes in HLOperationLowering are NFC, so there is no additional need to test these changes later in the IR flow.

These two tests were introduced in PR microsoft#7116, but they are fragile to
changes in the optimizer. So I've rewritten them as `-fcgl` tests to
isolate them from changes to the optimizer.

Notably PR microsoft#7116 contains functional changes only to the Clang CodeGen
layer, the other changes in HLOperationLowering are NFC, so there is no
additional need to test these changes later in the IR flow.
Copilot AI balanced review requested due to automatic review settings October 4, 2026 23:30

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.

Copilot review overview

🟡 Changes recommended

Both files retain extensive FileCheck directives that the rewritten RUN lines no longer execute.

Review effort: Balanced
Findings: 2 Low severity

Open (2)
What changed in this PR

Rewrites optimizer-sensitive buffer tests to validate frontend CodeGen IR with -fcgl.

Changes:

  • Switches test invocations to frontend IR generation.
  • Adds operation-count, ordering, and selected type checks.
File Description
buffer-load-stores.hlsl Adds frontend checks for scalar/vector resource operations.
buffer-agg-load-stores.hlsl Adds frontend checks across aggregate resource types.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-agg-load-stores.hlsl Outdated
Comment thread tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-load-stores.hlsl Outdated
../tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-agg-load-stores.h
lsl
../tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-load-stores.hlsl
Copilot AI balanced review requested due to automatic review settings October 5, 2026 17:03

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.

Copilot review overview

🟡 Changes recommended

The generalized checks no longer verify key type and storage representations across the tested configurations.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (2)

@llvm-beanz
Chris B (llvm-beanz) merged commit aa001f3 into microsoft:main Oct 5, 2026
12 checks passed
@llvm-beanz
Chris B (llvm-beanz) deleted the rewrite-tests branch October 5, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants