diff options
| author | Ralf Jung <post@ralfj.de> | 2022-08-27 14:54:02 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-08-27 18:37:44 -0400 |
| commit | 2e172473daefd24631faf3906bd411798d7d8a17 (patch) | |
| tree | 4bbfce7ca26338ca0db6ac3821acafd58b479d5c /compiler/rustc_codegen_cranelift | |
| parent | e63a6257118effd270223ae38306013dfd477516 (diff) | |
| download | rust-2e172473daefd24631faf3906bd411798d7d8a17.tar.gz rust-2e172473daefd24631faf3906bd411798d7d8a17.zip | |
interpret: make read-pointer-as-bytes *always* work in Miri
and show some extra information when it happens in CTFE
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs index a32b413d45f..1f358b1bbb9 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs @@ -186,7 +186,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( let size = Size::from_bytes( 4 * ret_lane_count, /* size_of([u32; ret_lane_count]) */ ); - alloc.inner().get_bytes(fx, alloc_range(offset, size)).unwrap() + alloc + .inner() + .get_bytes_strip_provenance(fx, alloc_range(offset, size)) + .unwrap() } _ => unreachable!("{:?}", idx_const), }; |
