Skip to content

Add regex to BufferFloat-error-64bit.test CHECKs#716

Merged
tcorringham merged 2 commits intollvm:mainfrom
tcorringham:issue-715
Mar 6, 2026
Merged

Add regex to BufferFloat-error-64bit.test CHECKs#716
tcorringham merged 2 commits intollvm:mainfrom
tcorringham:issue-715

Conversation

@tcorringham
Copy link
Copy Markdown
Contributor

The representation of hex float values with trailing zeros can vary between platforms - some include trailing zeros, but some exclude them. This change amends the CHECK patterns that include trailing zeros to use regex patterns which allow for either representation.

Fixes #715

The representation of hex float values with trailing zeros can vary
between platforms - some include trailing zeros, but some exclude them.
This change amends the CHECK patterns that include trailing zeros to
use regex patterns which allow for either representation.

Fixes llvm#715
# CHECK: ...
# CHECK-NEXT: Full Hex 64bit representation of Expected Buffer Values:
# CHECK-NEXT: [ 0x1.8000000000000p+0, 0x1.4000000000000p+1 ]
# CHECK-NEXT: [ 0x1.8{{[0]*}}p+0, 0x1.4{{[0]*}}p+1 ]
Copy link
Copy Markdown
Member

@farzonl farzonl Feb 12, 2026

Choose a reason for hiding this comment

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

@spall can you take a look? Isn't this one of the reasons we use the BufferExact Rule? Should we be removing these Checks and replacing them with buffer rules?

  - Result: Out
    Rule: BufferExact
    Actual: Out
    Expected: ExpectedOut

Copy link
Copy Markdown
Contributor

@spall spall Feb 17, 2026

Choose a reason for hiding this comment

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

yeah i think using the rules instead of CHECK would avoid this issue completely?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was revisiting this test to update it to use BufferExact as suggested above, but then I wondered what the intended purpose of the test is.
As this is in the "Offloader" test directory, is this test actually intended to test that the Offloader rules are agreeing with the CHECK rules? i.e. testing the offloader mechanism rather than the GPU behaviour - if so removing the CHECK rules defeats the aim of the test.
Thoughts anyone?

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.

Yes, I think you're right. I didn't remember what this test was for when I made my comment.

@tcorringham
Copy link
Copy Markdown
Contributor Author

The one failing check is unrelated to the change.

@tcorringham tcorringham merged commit 9b37512 into llvm:main Mar 6, 2026
11 of 12 checks passed
@tcorringham tcorringham deleted the issue-715 branch March 6, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AMD][Vulkan] BufferFloat-error-64bit.test trailing zeros

3 participants