1 ; RUN: llc -march=hexagon -verify-machineinstrs -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
4 ; Check for some output (as opposed to a crash).
7 target triple = "hexagon"
9 @x = external local_unnamed_addr global [80 x i32], align 8
11 ; Function Attrs: nounwind
12 define void @fred() local_unnamed_addr #0 {
16 b1: ; preds = %b20, %b0
19 b2: ; preds = %b2, %b1
20 %v3 = phi i32 [ 0, %b1 ], [ %v17, %b2 ]
21 %v4 = phi i32 [ 0, %b1 ], [ %v16, %b2 ]
22 %v5 = phi i32 [ undef, %b1 ], [ %v18, %b2 ]
23 %v6 = load i32, ptr undef, align 8
24 %v7 = icmp sgt i32 %v6, undef
25 %v8 = select i1 %v7, i32 %v3, i32 %v4
26 %v9 = select i1 undef, i32 0, i32 %v8
27 %v10 = select i1 undef, i32 undef, i32 %v9
28 %v11 = select i1 undef, i32 0, i32 %v10
29 %v12 = icmp sgt i32 undef, 0
30 %v13 = select i1 %v12, i32 undef, i32 %v11
31 %v14 = select i1 false, i32 undef, i32 %v13
32 %v15 = select i1 false, i32 undef, i32 %v14
33 %v16 = select i1 false, i32 undef, i32 %v15
34 %v17 = add nsw i32 %v3, 8
35 %v18 = add i32 %v5, -8
36 %v19 = icmp eq i32 %v18, 0
37 br i1 %v19, label %b20, label %b2
40 %v21 = getelementptr inbounds [80 x i32], ptr @x, i32 0, i32 %v16
41 store i32 -2000, ptr %v21, align 4
45 attributes #0 = { nounwind "target-cpu"="hexagonv55" "target-features"="-hvx,-long-calls" }