mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Remove vector support from load_scalar
This commit is contained in:
@@ -122,14 +122,11 @@ pub fn load_scalar<'a>(self, fx: &mut FunctionCx<'_, 'tcx, impl Backend>) -> Val
|
||||
let layout = self.1;
|
||||
match self.0 {
|
||||
CValueInner::ByRef(ptr) => {
|
||||
let clif_ty = match layout.abi {
|
||||
layout::Abi::Scalar(ref scalar) => scalar_to_clif_type(fx.tcx, scalar.clone()),
|
||||
layout::Abi::Vector { ref element, count } => {
|
||||
scalar_to_clif_type(fx.tcx, element.clone())
|
||||
.by(u16::try_from(count).unwrap()).unwrap()
|
||||
}
|
||||
let scalar = match layout.abi {
|
||||
layout::Abi::Scalar(ref scalar) => scalar.clone(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let clif_ty = scalar_to_clif_type(fx.tcx, scalar);
|
||||
ptr.load(fx, clif_ty, MemFlags::new())
|
||||
}
|
||||
CValueInner::ByVal(value) => value,
|
||||
|
||||
Reference in New Issue
Block a user