AMDGPU: Refactor immediate folding logic
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 29 Nov 2016 19:20:42 +0000 (19:20 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 29 Nov 2016 19:20:42 +0000 (19:20 +0000)
commitff8bb49bf45aa0de0908841720a7c592a76ebc0c
tree4770dd5db9b4bfa27039c7ec93e2121ea9c76ef5
parent09c563081880332aa91278eb236762080c0fb971
AMDGPU: Refactor immediate folding logic

Change the logic for when to fold immediates to
consider the destination operand rather than the
source of the materializing mov instruction.

No change yet, but this will allow for correctly handling
i16/f16 operands. Since 32-bit moves are used to materialize
constants for these, the same bitvalue will not be in the
register.

llvm-svn: 288184
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp