AMDGPU/GlobalISel: Fix incorrect VOP3P fneg folding
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 19 Feb 2020 17:35:12 +0000 (12:35 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Tue, 25 Feb 2020 02:20:35 +0000 (21:20 -0500)
commit0b46b078b656eacaf8fb0b550825189a051f0744
tree70a7a17de920629a99f63b64c0a4736d3bee302b
parent11e3dde6252f481238dccd14956350ff328c4087
AMDGPU/GlobalISel: Fix incorrect VOP3P fneg folding

We use some s32 values in VOP3P operands, and won't see any
intervening casts from a 32-bit fneg. Make sure it's really a packed
fneg before folding.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.fdot2.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.sdot2.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.sdot4.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.sdot8.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.udot2.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.udot4.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.udot8.ll