diff --git a/src/panfrost/compiler/kraid/builder.rs b/src/panfrost/compiler/kraid/builder.rs index d0784637e5a..627ec44af6c 100644 --- a/src/panfrost/compiler/kraid/builder.rs +++ b/src/panfrost/compiler/kraid/builder.rs @@ -20,9 +20,9 @@ pub trait Builder { pub trait SSABuilder: Builder { fn alloc_ssa(&mut self, bits: u8) -> SSAValue; - fn mov_i16(&mut self, src: Src) -> SSAValue { + fn copy_i16(&mut self, src: Src) -> SSAValue { let def = self.alloc_ssa(16); - self.push_op(OpMov { + self.push_op(OpCopy { dst: def.into(), dst_type: DataType::I16, src, @@ -30,9 +30,9 @@ pub trait SSABuilder: Builder { def } - fn mov_i32(&mut self, src: Src) -> SSAValue { + fn copy_i32(&mut self, src: Src) -> SSAValue { let def = self.alloc_ssa(32); - self.push_op(OpMov { + self.push_op(OpCopy { dst: def.into(), dst_type: DataType::I32, src, diff --git a/src/panfrost/compiler/kraid/nir.rs b/src/panfrost/compiler/kraid/nir.rs index 5ceb50b4bdb..d470f271c9f 100644 --- a/src/panfrost/compiler/kraid/nir.rs +++ b/src/panfrost/compiler/kraid/nir.rs @@ -178,12 +178,12 @@ impl<'a> ShaderFromNir<'a> { assert_eq!(imm_u32.len(), usize::from(bits.div_ceil(32))); if bits <= 16 { - let ssa = b.mov_i16(Src::imm_u16(imm_u32[0] as u16)); + let ssa = b.copy_i16(Src::imm_u16(imm_u32[0] as u16)); self.set_ssa(&load.def, vec![ssa]); } else { self.set_ssa( &load.def, - imm_u32.into_iter().map(|u| b.mov_i32(u.into())).collect(), + imm_u32.into_iter().map(|u| b.copy_i32(u.into())).collect(), ); } } @@ -261,7 +261,7 @@ impl<'a> ShaderFromNir<'a> { let mut dst_vec = Vec::new(); if srcs.len() == 1 && src_bit_size <= 16 { let x = srcs.next().unwrap(); - dst_vec.push(b.mov_i16(x)); + dst_vec.push(b.copy_i16(x)); } else if srcs.len() == 2 && src_bit_size == 8 { let x = srcs.next().unwrap(); let y = srcs.next().unwrap(); @@ -286,7 +286,7 @@ impl<'a> ShaderFromNir<'a> { dst_vec.push(b.mkvec_v2i16(x, y)); } } else if src_bit_size == 32 { - dst_vec = srcs.map(|src| b.mov_i32(src)).collect(); + dst_vec = srcs.map(|src| b.copy_i32(src)).collect(); } else { panic!("Unsupported bit size: {src_bit_size}"); } diff --git a/src/panfrost/compiler/kraid/ops.rs b/src/panfrost/compiler/kraid/ops.rs index 683b9ba9949..cf000185c71 100644 --- a/src/panfrost/compiler/kraid/ops.rs +++ b/src/panfrost/compiler/kraid/ops.rs @@ -604,7 +604,7 @@ impl VirtualOpcode for OpMkVecV4I8 { #[repr(C)] #[derive(Clone, Opcode)] -#[variants(dst_type in [I16, V2I16, I32])] +#[variants(dst_type in [V2I16, I32])] pub struct OpMov { pub dst: Dst, pub dst_type: DataType,