Skip to content

Commit

Permalink
Rollup merge of #124003 - WaffleLapkin:dellvmization, r=scottmcm,Ralf…
Browse files Browse the repository at this point in the history
…Jung,antoyo

Dellvmize some intrinsics (use `u32` instead of `Self` in some integer intrinsics)

This implements rust-lang/compiler-team#693 minus what was implemented in #123226.

Note: I decided to _not_ change `shl`/... builder methods, as it just doesn't seem worth it.

r? ``@scottmcm``
  • Loading branch information
matthiaskrgr authored Apr 23, 2024
2 parents c9e356a + d871076 commit 8afe33d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shims/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
}
}
Op::Numeric(name) => {
this.numeric_intrinsic(name, op.to_scalar(), op.layout)?
this.numeric_intrinsic(name, op.to_scalar(), op.layout, op.layout)?
}
};
this.write_scalar(val, &dest)?;
Expand Down
2 changes: 1 addition & 1 deletion tests/fail/intrinsics/ctlz_nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mod rusti {
extern "rust-intrinsic" {
pub fn ctlz_nonzero<T>(x: T) -> T;
pub fn ctlz_nonzero<T>(x: T) -> u32;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/fail/intrinsics/cttz_nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mod rusti {
extern "rust-intrinsic" {
pub fn cttz_nonzero<T>(x: T) -> T;
pub fn cttz_nonzero<T>(x: T) -> u32;
}
}

Expand Down

0 comments on commit 8afe33d

Please sign in to comment.