1 ; This test is based on one of benchmarks from SPEC2006. It exposes a bug with 2 ; incorrect updating of the dom-tree. 3 ; RUN: opt < %s -loop-vectorize -verify-dom-info 4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 5 6 @PL_utf8skip = external constant [0 x i8] 7 8 ; Function Attrs: nounwind ssp uwtable 9 define void @Perl_pp_quotemeta() #0 { 10 %len = alloca i64, align 8 11 br i1 undef, label %2, label %1 12 13 ; <label>:1 ; preds = %0 14 br label %3 15 16 ; <label>:2 ; preds = %0 17 br label %3 18 19 ; <label>:3 ; preds = %2, %1 20 br i1 undef, label %34, label %4 21 22 ; <label>:4 ; preds = %3 23 br i1 undef, label %5, label %6 24 25 ; <label>:5 ; preds = %4 26 br label %6 27 28 ; <label>:6 ; preds = %5, %4 29 br i1 undef, label %7, label %8 30 31 ; <label>:7 ; preds = %6 32 br label %8 33 34 ; <label>:8 ; preds = %7, %6 35 br i1 undef, label %.preheader, label %9 36 37 .preheader: ; preds = %9, %8 38 br i1 undef, label %.loopexit, label %.lr.ph 39 40 ; <label>:9 ; preds = %8 41 br i1 undef, label %thread-pre-split.preheader, label %.preheader 42 43 thread-pre-split.preheader: ; preds = %9 44 br i1 undef, label %thread-pre-split._crit_edge, label %.lr.ph21 45 46 .thread-pre-split.loopexit_crit_edge: ; preds = %19 47 %scevgep.sum = xor i64 %umax, -1 48 %scevgep45 = getelementptr i8, i8* %d.020, i64 %scevgep.sum 49 br label %thread-pre-split.loopexit 50 51 thread-pre-split.loopexit: ; preds = %11, %.thread-pre-split.loopexit_crit_edge 52 %d.1.lcssa = phi i8* [ %scevgep45, %.thread-pre-split.loopexit_crit_edge ], [ %d.020, %11 ] 53 br i1 false, label %thread-pre-split._crit_edge, label %.lr.ph21 54 55 .lr.ph21: ; preds = %26, %thread-pre-split.loopexit, %thread-pre-split.preheader 56 %d.020 = phi i8* [ undef, %26 ], [ %d.1.lcssa, %thread-pre-split.loopexit ], [ undef, %thread-pre-split.preheader ] 57 %10 = phi i64 [ %28, %26 ], [ undef, %thread-pre-split.loopexit ], [ undef, %thread-pre-split.preheader ] 58 br i1 undef, label %11, label %22 59 60 ; <label>:11 ; preds = %.lr.ph21 61 %12 = getelementptr inbounds [0 x i8], [0 x i8]* @PL_utf8skip, i64 0, i64 undef 62 %13 = load i8, i8* %12, align 1 63 %14 = zext i8 %13 to i64 64 %15 = icmp ugt i64 %14, %10 65 %. = select i1 %15, i64 %10, i64 %14 66 br i1 undef, label %thread-pre-split.loopexit, label %.lr.ph28 67 68 .lr.ph28: ; preds = %11 69 %16 = xor i64 %10, -1 70 %17 = xor i64 %14, -1 71 %18 = icmp ugt i64 %16, %17 72 %umax = select i1 %18, i64 %16, i64 %17 73 br label %19 74 75 ; <label>:19 ; preds = %19, %.lr.ph28 76 %ulen.126 = phi i64 [ %., %.lr.ph28 ], [ %20, %19 ] 77 %20 = add i64 %ulen.126, -1 78 %21 = icmp eq i64 %20, 0 79 br i1 %21, label %.thread-pre-split.loopexit_crit_edge, label %19 80 81 ; <label>:22 ; preds = %.lr.ph21 82 br i1 undef, label %26, label %23 83 84 ; <label>:23 ; preds = %22 85 br i1 undef, label %26, label %24 86 87 ; <label>:24 ; preds = %23 88 br i1 undef, label %26, label %25 89 90 ; <label>:25 ; preds = %24 91 br label %26 92 93 ; <label>:26 ; preds = %25, %24, %23, %22 94 %27 = load i64, i64* %len, align 8 95 %28 = add i64 %27, -1 96 br i1 undef, label %thread-pre-split._crit_edge, label %.lr.ph21 97 98 thread-pre-split._crit_edge: ; preds = %26, %thread-pre-split.loopexit, %thread-pre-split.preheader 99 br label %.loopexit 100 101 .lr.ph: ; preds = %33, %.preheader 102 br i1 undef, label %29, label %thread-pre-split5 103 104 ; <label>:29 ; preds = %.lr.ph 105 br i1 undef, label %33, label %30 106 107 ; <label>:30 ; preds = %29 108 br i1 undef, label %33, label %31 109 110 thread-pre-split5: ; preds = %.lr.ph 111 br i1 undef, label %33, label %31 112 113 ; <label>:31 ; preds = %thread-pre-split5, %30 114 br i1 undef, label %33, label %32 115 116 ; <label>:32 ; preds = %31 117 br label %33 118 119 ; <label>:33 ; preds = %32, %31, %thread-pre-split5, %30, %29 120 br i1 undef, label %.loopexit, label %.lr.ph 121 122 .loopexit: ; preds = %33, %thread-pre-split._crit_edge, %.preheader 123 br label %35 124 125 ; <label>:34 ; preds = %3 126 br label %35 127 128 ; <label>:35 ; preds = %34, %.loopexit 129 br i1 undef, label %37, label %36 130 131 ; <label>:36 ; preds = %35 132 br label %37 133 134 ; <label>:37 ; preds = %36, %35 135 ret void 136 } 137 138 attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 139 140 !llvm.ident = !{!0} 141 142 !0 = !{!"clang version 3.6.0 "} 143