Add regex to BufferFloat-error-64bit.test CHECKs#716
Conversation
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 ] |
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
yeah i think using the rules instead of CHECK would avoid this issue completely?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yes, I think you're right. I didn't remember what this test was for when I made my comment.
|
The one failing check is unrelated to the change. |
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