Skip to content

Commit 52b0687

Browse files
committed
Simplify handling of some SIMD intrinsics
1 parent 98dd5a3 commit 52b0687

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/intrinsic/llvm.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,9 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
603603
| "__builtin_ia32_aesenc256kl_u8"
604604
| "__builtin_ia32_aesdec256kl_u8" => {
605605
let mut new_args = vec![];
606-
// TODO: directly create a variable of type m128i instead of the whole struct?
607-
let (aes_output_type, _, field2) = aes_output_type(builder);
608-
let result = builder.current_func().new_local(None, aes_output_type, "result");
609-
let field2 = result.access_field(None, field2);
610-
new_args.push(field2.get_address(None));
606+
let m128i = builder.context.new_vector_type(builder.i64_type, 2);
607+
let result = builder.current_func().new_local(None, m128i, "result");
608+
new_args.push(result.get_address(None));
611609
new_args.extend(args.to_vec());
612610
args = new_args.into();
613611
}

0 commit comments

Comments
 (0)