[llvm] AMDGPU: Use pattern to select instruction for intrinsic llvm.fptrunc.round (PR #105761)
    Changpeng Fang via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Aug 28 21:45:05 PDT 2024
    
    
  
================
@@ -5595,6 +5595,12 @@ void AMDGPUInstructionSelector::renderFPPow2ToExponent(MachineInstrBuilder &MIB,
   MIB.addImm(ExpVal);
 }
 
+void AMDGPUInstructionSelector::renderRoundMode(MachineInstrBuilder &MIB,
+                                                const MachineInstr &MI,
+                                                int OpIdx) const {
+  MIB.addImm((MI.getOperand(OpIdx).getImm() + 3) % 4);
----------------
changpeng wrote:
Done! Thanks
https://github.com/llvm/llvm-project/pull/105761
    
    
More information about the llvm-commits
mailing list