1; RUN: opt -S -loop-vectorize < %s | FileCheck %s
2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-unknown-linux-gnu"
4
5; CHECK-LABEL: @fn1
6define void @fn1() {
7entry-block:
8  br label %middle
9
10middle:
11  %0 = phi {}* [ %3, %middle ], [ inttoptr (i64 0 to {}*), %entry-block ]
12  %1 = bitcast {}* %0 to i8*
13  %2 = getelementptr i8, i8* %1, i64 1
14  %3 = bitcast i8* %2 to {}*
15  %4 = icmp eq i8* %2, undef
16  br i1 %4, label %exit, label %middle
17
18; CHECK:      %[[phi:.*]] = phi {}* [ %3, %middle ], [ null, %entry-block ]
19; CHECK-NEXT: %[[bc1:.*]] = bitcast {}* %[[phi]] to i8*
20; CHECK-NEXT: %[[gep:.*]] = getelementptr i8, i8* %[[bc1]], i64 1
21; CHECK-NEXT: %[[bc2:.*]] = bitcast i8* %[[gep]] to {}*
22; CHECK-NEXT: %[[cmp:.*]] = icmp eq i8* %[[gep]], undef
23; CHECK-NEXT: br i1 %[[cmp]],
24
25exit:
26  ret void
27}
28