Repository navigation
[NFC] Rewrite fragile tests - #9001
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both files retain extensive FileCheck directives that the rewritten RUN lines no longer execute.
Review effort: Balanced
Findings: 2
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.
Damyan Pepper (damyanp)
approved these changes
Oct 5, 2026
../tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-agg-load-stores.h lsl ../tools/clang/test/CodeGenDXIL/hlsl/intrinsics/buffer-load-stores.hlsl
joaosaffran
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


These two tests were introduced in PR #7116, but they are fragile to changes in the optimizer. So I've rewritten them as
-fcgltests 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.