[AMDGPU] Do not generate mul with 1 in AMDGPU Atomic Optimizer
authorMirko Brkusanin <Mirko.Brkusanin@amd.com>
Tue, 29 Sep 2020 14:35:42 +0000 (16:35 +0200)
committerMirko Brkusanin <Mirko.Brkusanin@amd.com>
Wed, 30 Sep 2020 09:09:18 +0000 (11:09 +0200)
commit0249df33fec16b728e2d33cae02f5da4c9f74e38
treec56a5a38c95fc6b9e4986d81a18486e0e8a9ea8c
parent64e8fd540ecc38ee3daf942499091589785e2733
[AMDGPU] Do not generate mul with 1 in AMDGPU Atomic Optimizer

Check if operand of mul is constant value of one for certain atomic
instructions in order to avoid making unnecessary instructions when
-amdgpu-atomic-optimizer is present.

Differential Revision: https://reviews.llvm.org/D88315
llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/atomic_optimizations_mul_one.ll [new file with mode: 0644]