[AMDGPU] Use divergent addresses for vector loads
authorJay Foad <jay.foad@amd.com>
Fri, 19 Feb 2021 15:04:03 +0000 (15:04 +0000)
committerJay Foad <jay.foad@amd.com>
Tue, 23 Feb 2021 13:33:15 +0000 (13:33 +0000)
commitfdaa2d02591b10c96ca8705041dfc75fcbf97095
treeba6e07b46a7b21a0f81a6a0b5843d631cce2882b
parente1c3bf6afe09851537ff376ab20714dfd5f9649d
[AMDGPU] Use divergent addresses for vector loads

Change some test cases to use divergent addresses for vector loads,
which should be the common case in real world code. Using uniform
addresses causes poor instruction selection for the surrounding
code which has to be fixed up post-register-allocation, and this causes
a lot of testsuite churn for a forthcoming patch to stop selecting
24-bit vector multiply instructions for uniform multiplies.

This shows up some problems in the idot tests where we fail to select
v_dot instructions because the patterns only match MUL_[UI]24 ISD nodes,
but the DAG contains i16 mul nodes instead.

Differential Revision: https://reviews.llvm.org/D97062
llvm/test/CodeGen/AMDGPU/idot2.ll
llvm/test/CodeGen/AMDGPU/idot4s.ll
llvm/test/CodeGen/AMDGPU/idot4u.ll
llvm/test/CodeGen/AMDGPU/idot8s.ll
llvm/test/CodeGen/AMDGPU/idot8u.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.ll
llvm/test/CodeGen/AMDGPU/sdwa-peephole.ll