[PATCH] D90050: AMDGPU/GlobalISel: Add integer med3 combines
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 03:06:27 PDT 2020
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:132-133
+ MinMaxMedOpc OpcodeTriple = getMinMaxPair(Opc);
+ if (!OpcodeTriple.Min)
+ return false;
+
----------------
This should never fail.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:141
+ const MachineInstr *Val, *InnerInst, *K0, *K1;
+ // Match min(max(Val, K0), K1) or max(min(Val, K1), K0). Then see if K0 < K1.
+ if (!matchMed(MI, MRI, OpcodeTriple, Val, InnerInst, K0, K1))
----------------
I think it only has to be K0 <= K1.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90050/new/
https://reviews.llvm.org/D90050
More information about the llvm-commits
mailing list