Fix LLVM IR expectations for the autodiff generic test#156754
Open
sgasho wants to merge 1 commit into
Open
Conversation
sgasho
commented
May 19, 2026
| // F64-NEXT: start: | ||
| // F64-NEXT: {{(tail )?}}call {{(fastcc )?}}void @diffe_{{.*}}(double {{.*}}, ptr {{.*}}) | ||
| // F64-NEXT: ret void | ||
| // F64-NEXT: {{(tail )?}}call {{.*}} @diffe_{{.*}} |
Contributor
Author
There was a problem hiding this comment.
I'm still learning what level of detail LLVM IR checks should usually assert.
Since the exact return type and arg types of the generated @diffe_ call seem somewhat fragile here, would it be better to avoid checking them?
Is it enough for this test to only check that a diffe_ function is called?
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.
Relax the LLVM IR checks for
d_square::<f64>so they do not depend on the exact return type or argument ABI(which I don't think are necessary to check here) of the generated@diffe_call.Also add checks that
square::<f64>is generated, sinced_square::<f64>needs thef64monomorphization even thoughsquare::<f64>is not called directly. I thought it seems natural to check it, but let me know if we do not need it.I tested it works on my local(aarch64 mac) and dev-desktop(x86_64 linux)
r? @ZuseZ4