[AMDGPU] Preserve call-site attributes rebuilding an intrinsic (#201549)
This PR copies the original call-site attributes onto the new call.
`AMDGPUInstCombineIntrinsic` uses `IC.Builder.CreateIntrinsic` to
rebuild intrinsic calls. `CreateIntrinsic` only inherits attributes from
the intrinsic declaration, and any call-site only attributes are
silently dropped.
The change is needed in both `modifyIntrinsicCall` simplifications and
`simplifyAMDGCNMemoryIntrinsicDemanded`. The new test exercises both
transformations firing in sequence on the same `image.sample` call. Two
commits: the first adds the test that drops the attribute and then the
second commit fixes the bug and the test.
This fix was originally introduced in the context of
waterfall intrinsics #192409, but the issue and the fix are independent.