[PATCH] D88315: [AMDGPU] Do not generate mul with 1 in AMDGPU Atomic Optimizer

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 04:16:42 PDT 2020


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:407
 
+static bool isConstantOne(const Value* V) {
+  const ConstantInt *CI = dyn_cast<ConstantInt>(V);
----------------
It would be neater to have a BuildMul helper function that checks for and optimizes the mul-by-1 case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88315



More information about the llvm-commits mailing list