]> granicus.if.org Git - llvm/commit
MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block
authorNicolai Haehnle <nhaehnle@gmail.com>
Tue, 8 Oct 2019 12:46:20 +0000 (12:46 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Tue, 8 Oct 2019 12:46:20 +0000 (12:46 +0000)
commitaef8d68ace3e42ee73de11cf06c3e3909519be86
tree96769dc83f17d36b22f6dddaeb5539186403b895
parent5320e7b54b66f4cb52457f9a548bc2bfed25d5d4
MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block

Summary:
When getValueInMiddleOfBlock happens to be called for a basic block
that has no incoming value at all, an IMPLICIT_DEF is inserted in that
block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at
the top of its basic block or it will likely not reach the use that
the caller intends to insert.

Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

Reviewers: arsenm, rampitec

Subscribers: jvesely, wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68183

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374040 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineSSAUpdater.cpp
test/CodeGen/AMDGPU/si-i1-copies.mir [new file with mode: 0644]