File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/rustc_codegen_llvm/src/builder Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,11 @@ fn match_args_from_caller_to_enzyme<'ll>(
125
125
// int2 >= int1, which means the shadow vector is large enough to store the gradient.
126
126
assert_eq ! ( cx. type_kind( next_outer_ty) , TypeKind :: Integer ) ;
127
127
128
- for _ in 0 ..width {
129
- let next_outer_arg2 = outer_args[ outer_pos + 2 ] ;
128
+ for i in 0 ..( width as usize ) {
129
+ let next_outer_arg2 = outer_args[ outer_pos + 2 * ( i + 1 ) ] ;
130
130
let next_outer_ty2 = cx. val_ty ( next_outer_arg2) ;
131
131
assert_eq ! ( cx. type_kind( next_outer_ty2) , TypeKind :: Pointer ) ;
132
- let next_outer_arg3 = outer_args[ outer_pos + 3 ] ;
132
+ let next_outer_arg3 = outer_args[ outer_pos + 2 * ( i + 1 ) + 1 ] ;
133
133
let next_outer_ty3 = cx. val_ty ( next_outer_arg3) ;
134
134
assert_eq ! ( cx. type_kind( next_outer_ty3) , TypeKind :: Integer ) ;
135
135
args. push ( next_outer_arg2) ;
You can’t perform that action at this time.
0 commit comments