Without the fix gcc complains with
../lib/Target/AMDGPU/SIWholeQuadMode.cpp:1543: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
1542 | unsigned CopyOp = MI->getOperand(1).isReg()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1543 | ? AMDGPU::COPY
| ~~~~~~~~~~~~~~
1544 | : TII->getMovOpcode(TRI->getRegClassForOperandReg(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1545 | *MRI, MI->getOperand(0)));
|
}
unsigned CopyOp = MI->getOperand(1).isReg()
- ? AMDGPU::COPY
+ ? (unsigned)AMDGPU::COPY
: TII->getMovOpcode(TRI->getRegClassForOperandReg(
*MRI, MI->getOperand(0)));
MI->setDesc(TII->get(CopyOp));