[llvm] [AMDGPU] Adjust amdgpu fmax/fmin legalization (PR #202917)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 05:06:41 PDT 2026


================
@@ -10322,6 +10324,121 @@ void SIInstrInfo::fixImplicitOperands(MachineInstr &MI) const {
   }
 }
 
+// fcanonicalize is selected as a self-max (SelectCanonicalizeAsMax), i.e.
+// V_MAX_F{16,32} src, src, so only these max opcodes can define a canonicalize.
----------------
arsenm wrote:

This depends on the target, but the correct thing to do is check the actual operands 

https://github.com/llvm/llvm-project/pull/202917


More information about the llvm-commits mailing list