Skip to content

Commit 6664496

Browse files
committed
Remove outdated workaround for _mm_shuffle_ps argument type
1 parent a32244f commit 6664496

File tree

1 file changed

+1
-12
lines changed
  • c2rust-transpile/src/translator

1 file changed

+1
-12
lines changed

c2rust-transpile/src/translator/simd.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,7 @@ impl<'c> Translation<'c> {
218218
processed_args.extend(args[1..].iter().map(|arg| self.clean_int_or_vector_param(*arg)));
219219

220220
let param_translation = self.convert_exprs(ctx.used(), &processed_args)?;
221-
param_translation.and_then(|mut call_params| {
222-
if let Some(third_param) = call_params.get_mut(2) {
223-
// According to
224-
// https://github.com/rust-lang-nursery/stdsimd/issues/522#issuecomment-404563825
225-
// _mm_shuffle_ps taking an u32 instead of an i32 (like the rest of
226-
// the vector mask fields) is a bug, and so we need to add a cast
227-
// for it to work properly
228-
if fn_name == "_mm_shuffle_ps" {
229-
*third_param = mk().cast_expr(third_param.clone(), mk().ident_ty("u32"));
230-
}
231-
}
232-
221+
param_translation.and_then(|call_params| {
233222
let call = mk().call_expr(mk().ident_expr(fn_name), call_params);
234223

235224
if ctx.is_used() {

0 commit comments

Comments
 (0)