Keep track of stores produced by exploded copy_addrs in the NonLoadUses

set.  This is the last fix required to get copy_addr to forward to the
load in this trivial example from rdar://15170149:

func testTrivial(a : @inout Int) -> Int {
  return a
}

on to more testing.



Swift SVN r9167
This commit is contained in:
Chris Lattner
2013-10-10 20:20:53 +00:00
parent a3836f430d
commit e19ce563a5

View File

@@ -941,6 +941,7 @@ void ElementPromotion::explodeCopyAddr(CopyAddrInst *CAI,
case ValueKind::StoreInst:
Uses.push_back({ NewInst, CopyAddrKind });
NonLoadUses.insert(NewInst);
continue;
case ValueKind::CopyValueInst: