Add abs matrix tests - #1492
Merged
Merged
Add abs matrix tests#1492
abs matrix tests#1492Conversation
llvm-beanz
approved these changes
Sep 2, 2026
llvm-beanz
reviewed
Sep 2, 2026
Contributor
There was a problem hiding this comment.
One question here, do we generally need abs on uint? I assume these always get optimized away to nothing right?
Contributor
Author
There was a problem hiding this comment.
Yeah, I was actually debating whether to add this test for a while. I ended up adding it because uint goes through its own path (I believe a separate lowering in DXC and a different overload in Clang), so I thought it might be worth testing that it really behaves as an identity across targets. But definitely open to removing it.
bob80905
reviewed
Sep 11, 2026
bob80905
approved these changes
Sep 11, 2026
Alexander-Johnston
pushed a commit
to Alexander-Johnston/offload-test-suite
that referenced
this pull request
Sep 14, 2026
Closes llvm#796. Adds matrix tests for `abs` testing `float`, `int`, and `uint`. Will remove the XFAILs once the Clang implementation is in. Only testing 32-bit types because `float`/`int`/`uint` exercise all of the different `abs` paths on the DirectX and SPIR-V backends, and those paths behave the same at every bit size. Assisted-by: Claude Opus 4.8
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.
Closes #796.
Adds matrix tests for
abstestingfloat,int, anduint. Will remove the XFAILs once the Clang implementation is in.Only testing 32-bit types because
float/int/uintexercise all of the differentabspaths on the DirectX and SPIR-V backends, and those paths behave the same at every bit size.Assisted-by: Claude Opus 4.8