[llvm] AMDGPU: Use pattern to select instruction for intrinsic llvm.fptrunc.round (PR #105761)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 07:14:43 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);
----------------
arsenm wrote:
Probably should comment something about the encoding values, like take the comment from the custom lowering
https://github.com/llvm/llvm-project/pull/105761
More information about the llvm-commits
mailing list