[llvm] [AMDGPU][True16] Support V_CEIL_F16. (PR #73108)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 14:17:46 PST 2023
================
@@ -7150,8 +7155,14 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
if (AMDGPU::getNamedOperandIdx(NewOpcode,
AMDGPU::OpName::src0_modifiers) >= 0)
NewInstr.addImm(0);
- if (AMDGPU::getNamedOperandIdx(NewOpcode, AMDGPU::OpName::src0) >= 0)
- NewInstr->addOperand(Inst.getOperand(1));
+ if (AMDGPU::hasNamedOperand(NewOpcode, AMDGPU::OpName::src0)) {
+ MachineOperand Src = Inst.getOperand(1);
+ if (AMDGPU::isTrue16Inst(NewOpcode) && ST.useRealTrue16Insts() &&
+ Src.isReg() && RI.isVGPR(MRI, Src.getReg()))
+ NewInstr.addReg(Src.getReg(), 0, AMDGPU::lo16);
----------------
Sisyph wrote:
Can we create a new 16 bit VGPR and use that instead of forcing the lo16 to be used?
https://github.com/llvm/llvm-project/pull/73108
More information about the llvm-commits
mailing list