Skip to content

Commit 9ff44af

Browse files
committed
codegen_ssa: multiply scalable vec size by vscale
When emitting a `memcpy` for a scalable vector, the size computed by rustc (`num_vectors * element_count * element_ty`), since rust-lang/rust#157915, needs to be multiplied by `vscale`.
1 parent f516eb4 commit 9ff44af

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,10 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
14591459
);
14601460
}
14611461

1462+
fn vscale(&mut self, _: Self::Type) -> Self::Value {
1463+
unimplemented!("`rustc_codegen_gcc` doesn't support scalable vectors yet")
1464+
}
1465+
14621466
fn select(
14631467
&mut self,
14641468
cond: RValue<'gcc>,

0 commit comments

Comments
 (0)