Skip to content

Commit 3678621

Browse files
committed
Fix vpshrd llvm instrinsics
1 parent ade3739 commit 3678621

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/intrinsic/llvm.rs

+7
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(builder: &Builder<'a, 'gcc
313313
let new_args = args.to_vec();
314314
args = vec![new_args[1], new_args[0], new_args[2], new_args[3], new_args[4]].into();
315315
},
316+
"__builtin_ia32_vpshrdv_v8di" | "__builtin_ia32_vpshrdv_v4di" | "__builtin_ia32_vpshrdv_v2di" |
317+
"__builtin_ia32_vpshrdv_v16si" | "__builtin_ia32_vpshrdv_v8si" | "__builtin_ia32_vpshrdv_v4si" |
318+
"__builtin_ia32_vpshrdv_v32hi" | "__builtin_ia32_vpshrdv_v16hi" | "__builtin_ia32_vpshrdv_v8hi" => {
319+
// The first two arguments are reversed, compared to LLVM.
320+
let new_args = args.to_vec();
321+
args = vec![new_args[1], new_args[0], new_args[2]].into();
322+
},
316323
_ => (),
317324
}
318325
}

0 commit comments

Comments
 (0)