1 ; RUN: opt -passes=gvn -S < %s | FileCheck %s
3 ; Check that an unreachable predecessor to a PHI node doesn't cause a crash.
6 define i32 @f(ptr %f) {
8 ; Load should be removed, since it's ignored.
11 %bar = load ptr, ptr %f
14 %zed = load ptr, ptr %f
15 br i1 false, label %bb1, label %bb2
17 %foo = phi ptr [ null, %bb0 ], [ %zed, %bb1 ]
18 %storemerge = load i32, ptr %foo