1; RUN: llc -march=hexagon < %s
2; REQUIRES: asserts
3
4; Test that the compiler does not assert because the DAG is not correct.
5; CHECK: call foo
6
7%returntype = type { i1, i32 }
8
9define i32 @test(i32* %a0, i32* %a1, i32* %a2) #0 {
10b3:
11  br i1 undef, label %b6, label %b4
12
13b4:                                               ; preds = %b3
14  %v5 = call %returntype @foo(i32* nonnull undef, i32* %a2, i32* %a0) #0
15  ret i32 1
16
17b6:                                               ; preds = %b3
18  unreachable
19}
20
21declare %returntype @foo(i32*, i32*, i32*) #0
22
23attributes #0 = { nounwind }
24