File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
compiler/rustc_codegen_llvm/src/builder Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,12 @@ pub(crate) fn adjust_activity_to_abi<'tcx>(
90
90
}
91
91
} ;
92
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
- _ => { }
93
+ // If the argument is lowered as a `ScalarPair`, we need to duplicate its activity.
94
+ // Otherwise, the number of activities won't match the number of LLVM arguments and
95
+ // this will lead to errors when verifying the Enzyme call.
96
+ if let rustc_abi :: BackendRepr :: ScalarPair ( _ , _ ) = layout . backend_repr ( ) {
97
+ new_activities . push ( da [ i ] . clone ( ) ) ;
98
+ new_positions . push ( i + 1 ) ;
99
99
}
100
100
}
101
101
// now add the extra activities coming from slices
You can’t perform that action at this time.
0 commit comments