You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
May 20, 2026
I think I've seen some of these changes before, so my concern is that either we continue to make the tests increasingly weaker, or we'll keep swapping back and forth between different outputs.
In the past, I added the noPostOpt flag, which made it a little better, but since the output still changed, we should find a more robust solution before putting it in CI.
Can you have a look at the -C passes=val -- a list of extra LLVM passes to run (space separated) flag, as well as some of the enzyme tests which run extra opts after enzyme? https://github.com/EnzymeAD/Enzyme/blob/c96508349d9f121957292308c646b4a1fd53c507/enzyme/test/Enzyme/ReverseMode/add.ll#L2
We probably want to remove -Zautodiff=NoPostopt and replace it with -Zautodiff=Passes=... or something like that.
There is a -Zoffload=Host=path flag, which is also nested as an example.
The idea is that not setting the flag would result in the current behavior (full O3 after Enzyme), setting it to "" would be equal to the current NoPostOpt flag (which can then be removed) and by setting anything else we can specify the actual passes to run, similar to Enzyme.
rustbot
added
the
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
label
Jun 20, 2026
sgasho
changed the title
Fix LLVM IR expectations for the autodiff abi_handling tests
Add -Zautodiff_post_passes flag to limit which llvm passes to run after enzyme to make autodiff tests more robust
Jun 20, 2026
Thanks!
I added the autodiff_post_passes flag. I thought it would be convenient to pass LLVM passes in the same format LLVM expects, comma separated. If we add a nested option like -Zautodiff=Passes=..., we would need special parsing or escaping, since -Zautodiff options are also separated by commas.
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
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
3 participants
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.
r? @ZuseZ4