[ImplicitNullChecks] Properly update the live-in of the block of the memory operation.
authorQuentin Colombet <qcolombet@apple.com>
Wed, 27 Apr 2016 23:26:40 +0000 (23:26 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Wed, 27 Apr 2016 23:26:40 +0000 (23:26 +0000)
commit12b69919a22a3c2fbaf956f41290a56ebddf9a24
tree61b8ff684563bd77783cdf406143dc417ce41384
parenta4c3f67fe8c29a9a712de8db0b4d66743529749c
[ImplicitNullChecks] Properly update the live-in of the block of the memory operation.

We basically replace:
HoistBB:
cond_br NullBB, NotNullBB

NullBB:
  ...

NotNullBB:
  <reg> = load

into
HoistBB
<reg> = load_faulting_op NullBB
uncond_br NotNullBB

NullBB:
  ...

NotNullBB: ## <reg> is now live-in of NotNullBB
  ...

This partially fixes the machine verifier error for
test/CodeGen/X86/implicit-null-check.ll, but it still fails because
of the implicit CFG structure.

llvm-svn: 267817
llvm/lib/CodeGen/ImplicitNullChecks.cpp