AMDGPU: Fix allowing immediates for tail call pseudo.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 14 Mar 2021 20:59:34 +0000 (16:59 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 21 Mar 2021 17:14:04 +0000 (13:14 -0400)
commita0f5aad6d7099e8ecb85f34f7a682b5d1fd088c2
tree0d0c063445cefbec116ee14d51bb2aad32f419ae
parentffde3acb1b9c0f88f99bda82fd080de2d44ef50b
AMDGPU: Fix allowing immediates for tail call pseudo.

The pseudo was using SSrc_b64, so it allowed folding immediates into
the destination operand for a tail call to null. However, this is not
a valid operand for the s_setpc_b64 this will be lowered to. Avoids
printing the operand as an invalid immediate.

Avoids a regression when tail calls are enabled in GlobalISel (somehow
tail calls to null get deleted in the DAG).
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/MC/AMDGPU/sop1-err.s