if (copy.op.isConstant()) {
uint64_t val =
copy.op.constantValue64() | (other->second.op.constantValue64() << (copy.bytes * 8u));
- if (!Operand::is_constant_representable(val, copy.bytes + other->second.bytes, true,
+ if (!util_is_power_of_two_or_zero(new_size))
+ return;
+ if (!Operand::is_constant_representable(val, new_size, true,
copy.def.regClass().type() == RegType::vgpr))
return;
copy.op = Operand::get_const(ctx->program->chip_class, val, new_size);
PhysReg v0_lo{256};
PhysReg v0_hi{256};
PhysReg v0_b1{256};
+ PhysReg v1_lo{257};
PhysReg v1_hi{257};
v0_hi.reg_b += 2;
v0_b1.reg_b += 1;
bld.pseudo(aco_opcode::p_unit_test, Operand::c32(11u));
bld.pseudo(aco_opcode::p_parallelcopy, Definition(v0_lo, v1b), Operand::c8(0x42));
+ /* 32-bit and 8-bit copy */
+ //! p_unit_test 12
+ //! v1: %_:v[0] = v_mov_b32 0
+ //! v1b: %_:v[1][0:8] = v_mov_b32 0 dst_sel:ubyte0 dst_preserve src0_sel:dword
+ bld.pseudo(aco_opcode::p_unit_test, Operand::c32(12u));
+ bld.pseudo(aco_opcode::p_parallelcopy, Definition(v0_lo, v1), Definition(v1_lo, v1b),
+ Operand::zero(), Operand::zero(1));
+
//! s_endpgm
finish_to_hw_instr_test();