AMDGPU: Fix illegally constant folding from V_MOV_B32_sdwa
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 16 May 2020 17:48:55 +0000 (13:48 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 18 May 2020 19:34:33 +0000 (15:34 -0400)
commitb27a538dda4caf2752ed8c6c731361ddf9458b87
tree5a080d5e4f3f523230574483e58b5049dc6204d0
parentef649e8fd5d1748764a9afca3ce0b80113a6a239
AMDGPU: Fix illegally constant folding from V_MOV_B32_sdwa

This was assumed to be a simple move, and interpreting the immediate
modifier operand as a materialized immediate. Apparently the SDWA pass
never produces these, but GlobalISel does emit these for some vector
shuffles.
llvm/lib/Target/AMDGPU/VOP1Instructions.td
llvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
llvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
llvm/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir