Recommit the fix for rdar://9289512 with a couple tweaks to

fix bugs exposed by the gcc dejagnu testsuite:
1. The load may actually be used by a dead instruction, which
   would cause an assert.
2. The load may not be used by the current chain of instructions,
   and we could move it past a side-effecting instruction. Change
   how we process uses to define the problem away.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2011-04-22 21:59:37 +00:00
parent 597fa65373
commit b686af053e
4 changed files with 113 additions and 18 deletions

View File

@@ -92,3 +92,13 @@ define void @load_store_i1(i1* %p, i1* %q) nounwind {
store i1 %t, i1* %q
ret void
}
@crash_test1x = external global <2 x i32>, align 8
define void @crash_test1() nounwind ssp {
%tmp = load <2 x i32>* @crash_test1x, align 8
%neg = xor <2 x i32> %tmp, <i32 -1, i32 -1>
ret void
}