[AMDGPU] Mark sin/cos load folding as modifying the function.
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 13 Nov 2020 22:33:43 +0000 (14:33 -0800)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 13 Nov 2020 22:49:33 +0000 (14:49 -0800)
commitc9821cec7492f9ffb4586ece4a82fda1e5fe8e1e
tree4ae775c7fcb8b6e1e6039559a94e120ade1689a0
parentcfde3edeae4730aa44642c4835bcfa5a857ea8d4
[AMDGPU] Mark sin/cos load folding as modifying the function.

When the load value is folded into the sin/cos operation, the
AMDGPU library calls simplifier could still mark the function
as unmodified. Instead ensure if there is an early return,
return whether the load was folded into the sin/cos call.

Authored by MJDSys

Differential Revision: https://reviews.llvm.org/D91401
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp