[PATCH] D93708: [AMDGPU] Add a new Clamp Pattern to the GlobalISel Path.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 04:34:47 PST 2021
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:15-16
#include "AMDGPULegalizerInfo.h"
+#include "AMDGPUTargetMachine.h"
+#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/CodeGen/GlobalISel/Combiner.h"
----------------
You can use the [[ https://reviews.llvm.org/source/llvm-github/browse/main/clang/tools/clang-format/git-clang-format | git-clang-format ]] script to avoid reformatting the whole file. If you put it on your path then you can invoke it as e.g. `git clang-format @^` to only reformat the parts of the file that were changed by your most recent commit.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:311-319
+/**
+ * We want to find a combination of instructions that
+ * gets generated when an i64 gets clamped to i16.
+ * The corresponding pattern is:
+ * G_SELECT MIN/MAX, G_ICMP, G_SELECT MIN/MAX, G_ICMP, G_TRUNC.
+ * This can be efficiently written as following:
+ * v_cvt_pk_i16_i32 v0, v0, v1
----------------
Use `//` even for block comments please.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93708/new/
https://reviews.llvm.org/D93708
More information about the llvm-commits
mailing list