- check(instr->definitions[0].getTemp().type() == RegType::vgpr ||
- (int) instr->format & (int) Format::VOPC ||
- instr->opcode == aco_opcode::v_readfirstlane_b32 ||
- instr->opcode == aco_opcode::v_readlane_b32 ||
- instr->opcode == aco_opcode::v_readlane_b32_e64,
- "Wrong Definition type for VALU instruction", instr.get());
+ if ((int) instr->format & (int) Format::VOPC ||
+ instr->opcode == aco_opcode::v_readfirstlane_b32 ||
+ instr->opcode == aco_opcode::v_readlane_b32 ||
+ instr->opcode == aco_opcode::v_readlane_b32_e64) {
+ check(instr->definitions[0].getTemp().type() == RegType::sgpr,
+ "Wrong Definition type for VALU instruction", instr.get());
+ } else {
+ check(instr->definitions[0].getTemp().type() == RegType::vgpr,
+ "Wrong Definition type for VALU instruction", instr.get());
+ }
+