1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -newgvn -S | FileCheck %s
5 ;; Block 6 is reachable, but edge 6->4 is not
6 ;; This means the phi value is undef, not 0
7 ; Function Attrs: ssp uwtable
8 define i16 @hoge() local_unnamed_addr #0 align 2 {
11 ; CHECK-NEXT: switch i8 undef, label [[BB7:%.*]] [
12 ; CHECK-NEXT: i8 0, label [[BB1:%.*]]
13 ; CHECK-NEXT: i8 12, label [[BB2:%.*]]
16 ; CHECK-NEXT: br label [[BB6:%.*]]
18 ; CHECK-NEXT: br label [[BB4:%.*]]
20 ; CHECK-NEXT: unreachable
22 ; CHECK-NEXT: ret i16 undef
24 ; CHECK-NEXT: br i1 true, label [[BB3:%.*]], label [[BB4]], !llvm.loop !1
26 ; CHECK-NEXT: unreachable
29 switch i8 undef, label %bb7 [
43 bb4: ; preds = %bb6, %bb2
44 %tmp = phi i16 [ 0, %bb6 ], [ undef, %bb2 ]
48 br i1 true, label %bb3, label %bb4, !llvm.loop !1
54 attributes #0 = { ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
58 !0 = !{!"clang version 5.0.0"}
59 !1 = distinct !{!1, !2}
60 !2 = !{!"llvm.loop.unroll.disable"}