[AMDGPU] Simplify AMDGPUAnnotateUniformValues::visitLoadInst
authorJay Foad <jay.foad@amd.com>
Thu, 3 Feb 2022 15:27:12 +0000 (15:27 +0000)
committerJay Foad <jay.foad@amd.com>
Thu, 3 Feb 2022 16:27:48 +0000 (16:27 +0000)
commitb9cf52bc3d29fc5a28015ee642d2b63354391c41
treea534ab423209851e0596575cbdf478e1ab1d462c
parent93c81f44cce802be7f2b723a96ed8e10db6101fb
[AMDGPU] Simplify AMDGPUAnnotateUniformValues::visitLoadInst

Always set uniform metadata on the pointer if it is an instruction, but
otherwise do not bother to create a trivial getelementptr instruction,
because AMDGPUInstrInfo::isUniformMMO can already detect that various
non-instruction pointers are uniform.

Most of the test case churn is from tests that used undef as a pointer,
which AMDGPUInstrInfo::isUniformMMO treats as uniform.

Differential Revision: https://reviews.llvm.org/D118909
llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-amdgpu_kernel.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call.ll
llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
llvm/test/CodeGen/AMDGPU/fdiv.f64.ll
llvm/test/CodeGen/AMDGPU/global-variable-relocs.ll
llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
llvm/test/CodeGen/AMDGPU/noclobber-barrier.ll
llvm/test/CodeGen/AMDGPU/rcp-pattern.ll
llvm/test/CodeGen/AMDGPU/si-annotate-cf.ll
llvm/test/CodeGen/AMDGPU/vgpr-liverange-ir.ll