[PATCH] D93708: [AMDGPU] Add a new Clamp Pattern to the GlobalISel Path.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 10:04:22 PST 2021


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp:142-143
+  
+  auto Trunc = B.buildTrunc(LLT::scalar(16), Med3);
+  B.buildCopy(MI.getOperand(0).getReg(), Trunc);
+
----------------
You can truncate directly into the destination register, you don't need this copy


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2596
+
+def G_AMDGPU_MED3_S32 : AMDGPUGenericInstruction {
+  let OutOperandList = (outs type0:$dst);
----------------
No _S32, this is also available for s16 on some targets


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93708/new/

https://reviews.llvm.org/D93708



More information about the llvm-commits mailing list