OSDN Git Service

AMDGPU: Fix folding immediate into readfirstlane through reg_sequence
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 19 Jun 2019 20:44:15 +0000 (20:44 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 19 Jun 2019 20:44:15 +0000 (20:44 +0000)
commitbff29f6333be55184e218a541dfee50c68115fec
tree804992a56d02e550ec606f2b8f1c055ab1f4880f
parent4fba1e0a922695cb03f2e4c07875cfb8be2a2531
AMDGPU: Fix folding immediate into readfirstlane through reg_sequence

The def instruction for the vreg may not match, because it may be
folding through a reg_sequence. The assert was overly conservative and
not necessary. It's not actually important if DefMI really defined the
register, because the fold that will be done cares about the def of
the value that will be folded.

For some reason copies aren't making it through the reg_sequence,
although they should.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363876 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIFoldOperands.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
test/CodeGen/AMDGPU/constant-address-space-32bit.ll
test/CodeGen/AMDGPU/fold-readlane.mir