Skip to content

Commit 57b50df

Browse files
authored
Merge pull request rust-lang#241 from rust-lang/fix/avx-intrinsics
Fix the argument order for some AVX-512 intrinsics
2 parents 83c55fc + 69341c4 commit 57b50df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/intrinsic/llvm.rs

+9
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(builder: &Builder<'a, 'gcc
304304
new_args[0] = arg1.dereference(None).to_rvalue();
305305
args = new_args.into();
306306
},
307+
"__builtin_ia32_rcp14sd_mask" | "__builtin_ia32_rcp14ss_mask" | "__builtin_ia32_rsqrt14sd_mask"
308+
| "__builtin_ia32_rsqrt14ss_mask" => {
309+
let new_args = args.to_vec();
310+
args = vec![new_args[1], new_args[0], new_args[2], new_args[3]].into();
311+
},
312+
"__builtin_ia32_sqrtsd_mask_round" | "__builtin_ia32_sqrtss_mask_round" => {
313+
let new_args = args.to_vec();
314+
args = vec![new_args[1], new_args[0], new_args[2], new_args[3], new_args[4]].into();
315+
},
307316
_ => (),
308317
}
309318
}

0 commit comments

Comments
 (0)