We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 725b6a3 commit 2a4a97fCopy full SHA for 2a4a97f
1 file changed
compiler/rustc_codegen_llvm/src/builder/autodiff.rs
@@ -90,12 +90,12 @@ pub(crate) fn adjust_activity_to_abi<'tcx>(
90
}
91
};
92
93
- match layout.backend_repr() {
94
- rustc_abi::BackendRepr::ScalarPair(_, _) => {
95
- new_activities.push(da[i].clone());
96
- new_positions.push(i + 1);
97
- }
98
- _ => {}
+ // If the argument is lowered as a `ScalarPair`, we need to duplicate its activity.
+ // Otherwise, the number of activities won't match the number of LLVM arguments and
+ // this will lead to errors when verifying the Enzyme call.
+ if let rustc_abi::BackendRepr::ScalarPair(_, _) = layout.backend_repr() {
+ new_activities.push(da[i].clone());
+ new_positions.push(i + 1);
99
100
101
// now add the extra activities coming from slices
0 commit comments