| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --version 4 | 
 | ; RUN: opt -p loop-vectorize -enable-early-exit-vectorization -force-vector-width=4 -force-vector-interleave=4 -S %s | FileCheck --check-prefix=VF4IC4 %s | 
 |  | 
 | declare void @init_mem(ptr, i64); | 
 |  | 
 | define i64 @multi_exiting_to_different_exits_live_in_exit_values() { | 
 | ; VF4IC4-LABEL: define i64 @multi_exiting_to_different_exits_live_in_exit_values() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[SRC:%.*]] = alloca [128 x i32], align 4 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[SRC]]) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i32, ptr [[SRC]], i64 [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i32>, ptr [[TMP1]], align 4 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i32>, ptr [[TMP12]], align 4 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i32>, ptr [[TMP13]], align 4 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i32>, ptr [[TMP14]], align 4 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = icmp eq <4 x i32> [[WIDE_LOAD]], splat (i32 10) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq <4 x i32> [[WIDE_LOAD1]], splat (i32 10) | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = icmp eq <4 x i32> [[WIDE_LOAD2]], splat (i32 10) | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = icmp eq <4 x i32> [[WIDE_LOAD3]], splat (i32 10) | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = or <4 x i1> [[TMP2]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = or <4 x i1> [[TMP9]], [[TMP7]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = or <4 x i1> [[TMP10]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP11]]) | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp eq i64 [[INDEX_NEXT]], 128 | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = or i1 [[TMP3]], [[TMP4]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP3]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[E2:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    br label [[E1:%.*]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 128, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_HEADER:%.*]] | 
 | ; VF4IC4:       loop.header: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[INC:%.*]], [[LOOP_LATCH:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_SRC:%.*]] = getelementptr inbounds i32, ptr [[SRC]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[L:%.*]] = load i32, ptr [[GEP_SRC]], align 4 | 
 | ; VF4IC4-NEXT:    [[C_1:%.*]] = icmp eq i32 [[L]], 10 | 
 | ; VF4IC4-NEXT:    br i1 [[C_1]], label [[E1]], label [[LOOP_LATCH]] | 
 | ; VF4IC4:       loop.latch: | 
 | ; VF4IC4-NEXT:    [[INC]] = add nuw i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[C_2:%.*]] = icmp eq i64 [[INC]], 128 | 
 | ; VF4IC4-NEXT:    br i1 [[C_2]], label [[E2]], label [[LOOP_HEADER]], !llvm.loop [[LOOP3:![0-9]+]] | 
 | ; VF4IC4:       e1: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = phi i64 [ 0, [[LOOP_HEADER]] ], [ 0, [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[P1]] | 
 | ; VF4IC4:       e2: | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = phi i64 [ 1, [[LOOP_LATCH]] ], [ 1, [[MIDDLE_BLOCK]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[P2]] | 
 | ; | 
 | entry: | 
 |   %src = alloca [128 x i32] | 
 |   call void @init_mem(ptr %src) | 
 |   br label %loop.header | 
 |  | 
 | loop.header: | 
 |   %iv = phi i64 [ %inc, %loop.latch ], [ 0, %entry ] | 
 |   %gep.src = getelementptr inbounds i32, ptr %src, i64 %iv | 
 |   %l = load i32, ptr %gep.src | 
 |   %c.1 = icmp eq i32 %l, 10 | 
 |   br i1 %c.1, label %e1, label %loop.latch | 
 |  | 
 | loop.latch: | 
 |   %inc = add nuw i64 %iv, 1 | 
 |   %c.2 = icmp eq i64 %inc, 128 | 
 |   br i1 %c.2, label %e2, label %loop.header | 
 |  | 
 | e1: | 
 |   %p1 = phi i64 [ 0, %loop.header ] | 
 |   ret i64 %p1 | 
 |  | 
 | e2: | 
 |   %p2 = phi i64 [ 1, %loop.latch ] | 
 |   ret i64 %p2 | 
 | } | 
 |  | 
 | define i64 @same_exit_block_pre_inc_use1() { | 
 | ; VF4IC4-LABEL: define i64 @same_exit_block_pre_inc_use1() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = add i64 3, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD4:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP3]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP19]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP20]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD6:%.*]] = load <4 x i8>, ptr [[TMP21]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP22]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], [[WIDE_LOAD1]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD4]], [[WIDE_LOAD5]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], [[WIDE_LOAD6]] | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], [[WIDE_LOAD7]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = or <4 x i1> [[TMP4]], [[TMP11]] | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = or <4 x i1> [[TMP14]], [[TMP12]] | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = or <4 x i1> [[TMP15]], [[TMP13]] | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP16]]) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq i64 [[INDEX_NEXT]], 64 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = or i1 [[TMP5]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP13]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = add i64 12, [[TMP33]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP12]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = add i64 8, [[TMP35]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = icmp ne i64 [[TMP35]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = select i1 [[TMP23]], i64 [[TMP24]], i64 [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP11]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 4, [[TMP26]] | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = icmp ne i64 [[TMP26]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = select i1 [[TMP27]], i64 [[TMP28]], i64 [[TMP25]] | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP4]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = add i64 0, [[TMP30]] | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = icmp ne i64 [[TMP30]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = select i1 [[TMP31]], i64 [[TMP32]], i64 [[TMP29]] | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = add i64 [[INDEX]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = add i64 3, [[TMP9]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 67, [[MIDDLE_BLOCK]] ], [ 3, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[IV_NEXT]], 67 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP]], label [[LOOP_END]], !llvm.loop [[LOOP5:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi i64 [ [[IV]], [[LOOP]] ], [ 67, [[LOOP_INC]] ], [ 67, [[MIDDLE_BLOCK]] ], [ [[TMP10]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 3, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, 1 | 
 |   %exitcond = icmp ne i64 %iv.next, 67 | 
 |   br i1 %exitcond, label %loop, label %loop.end | 
 |  | 
 | loop.end: | 
 |   %retval = phi i64 [ %iv, %loop ], [ 67, %loop.inc ] | 
 |   ret i64 %retval | 
 | } | 
 |  | 
 | define ptr @same_exit_block_pre_inc_use1_ivptr() { | 
 | ; VF4IC4-LABEL: define ptr @same_exit_block_pre_inc_use1_ivptr() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    [[PTREND:%.*]] = getelementptr i8, ptr [[P1]], i64 1024 | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr i8, ptr [[P1]], i64 1024 | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[NEXT_GEP:%.*]] = getelementptr i8, ptr [[P1]], i64 [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr i8, ptr [[NEXT_GEP]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = getelementptr i8, ptr [[NEXT_GEP]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = getelementptr i8, ptr [[NEXT_GEP]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = getelementptr i8, ptr [[NEXT_GEP]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP12]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP13]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP14]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], splat (i8 72) | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD1]], splat (i8 72) | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], splat (i8 72) | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], splat (i8 72) | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = or <4 x i1> [[TMP2]], [[TMP15]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = or <4 x i1> [[TMP9]], [[TMP16]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = or <4 x i1> [[TMP10]], [[TMP17]] | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP11]]) | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1024 | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = or i1 [[TMP3]], [[TMP4]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP3]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP17]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = add i64 12, [[TMP28]] | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP16]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = add i64 8, [[TMP30]] | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = icmp ne i64 [[TMP30]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = select i1 [[TMP18]], i64 [[TMP19]], i64 [[TMP29]] | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP15]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = add i64 4, [[TMP21]] | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = icmp ne i64 [[TMP21]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = select i1 [[TMP22]], i64 [[TMP23]], i64 [[TMP20]] | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP2]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = add i64 0, [[TMP25]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = icmp ne i64 [[TMP25]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = select i1 [[TMP26]], i64 [[TMP27]], i64 [[TMP24]] | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = add i64 [[INDEX]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = getelementptr i8, ptr [[P1]], i64 [[TMP7]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi ptr [ [[TMP0]], [[MIDDLE_BLOCK]] ], [ [[P1]], [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[PTR:%.*]] = phi ptr [ [[PTR_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[PTR]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], 72 | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[PTR_NEXT]] = getelementptr inbounds i8, ptr [[PTR]], i64 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp ne ptr [[PTR_NEXT]], [[PTREND]] | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP]], label [[LOOP_END]], !llvm.loop [[LOOP7:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi ptr [ [[PTR]], [[LOOP]] ], [ [[PTREND]], [[LOOP_INC]] ], [ [[PTREND]], [[MIDDLE_BLOCK]] ], [ [[TMP8]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret ptr [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   %ptrend = getelementptr i8, ptr %p1, i64 1024 | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %ptr = phi ptr [ %ptr.next, %loop.inc ], [ %p1, %entry ] | 
 |   %ld1 = load i8, ptr %ptr, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, 72 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %ptr.next = getelementptr inbounds i8, ptr %ptr, i64 1 | 
 |   %exitcond = icmp ne ptr %ptr.next, %ptrend | 
 |   br i1 %exitcond, label %loop, label %loop.end | 
 |  | 
 | loop.end: | 
 |   %retval = phi ptr [ %ptr, %loop ], [ %ptrend, %loop.inc ] | 
 |   ret ptr %retval | 
 | } | 
 |  | 
 | define i64 @same_exit_block_post_inc_use() { | 
 | ; VF4IC4-LABEL: define i64 @same_exit_block_post_inc_use() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = add i64 3, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD4:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP3]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP19]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP20]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD6:%.*]] = load <4 x i8>, ptr [[TMP21]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP22]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], [[WIDE_LOAD1]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD4]], [[WIDE_LOAD5]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], [[WIDE_LOAD6]] | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], [[WIDE_LOAD7]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = or <4 x i1> [[TMP4]], [[TMP11]] | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = or <4 x i1> [[TMP14]], [[TMP12]] | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = or <4 x i1> [[TMP15]], [[TMP13]] | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP16]]) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq i64 [[INDEX_NEXT]], 64 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = or i1 [[TMP5]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP8:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP13]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = add i64 12, [[TMP33]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP12]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = add i64 8, [[TMP35]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = icmp ne i64 [[TMP35]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = select i1 [[TMP23]], i64 [[TMP24]], i64 [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP11]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 4, [[TMP26]] | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = icmp ne i64 [[TMP26]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = select i1 [[TMP27]], i64 [[TMP28]], i64 [[TMP25]] | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP4]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = add i64 0, [[TMP30]] | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = icmp ne i64 [[TMP30]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = select i1 [[TMP31]], i64 [[TMP32]], i64 [[TMP29]] | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = add i64 [[INDEX]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = add i64 3, [[TMP9]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 67, [[MIDDLE_BLOCK]] ], [ 3, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[IV_NEXT]], 67 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP]], label [[LOOP_END]], !llvm.loop [[LOOP9:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi i64 [ [[IV]], [[LOOP]] ], [ [[IV_NEXT]], [[LOOP_INC]] ], [ 67, [[MIDDLE_BLOCK]] ], [ [[TMP10]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 3, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, 1 | 
 |   %exitcond = icmp ne i64 %iv.next, 67 | 
 |   br i1 %exitcond, label %loop, label %loop.end | 
 |  | 
 | loop.end: | 
 |   %retval = phi i64 [ %iv, %loop ], [ %iv.next, %loop.inc ] | 
 |   ret i64 %retval | 
 | } | 
 |  | 
 | define i64 @diff_exit_block_pre_inc_use1() { | 
 | ; VF4IC4-LABEL: define i64 @diff_exit_block_pre_inc_use1() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = add i64 3, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD4:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP3]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP19]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP20]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD6:%.*]] = load <4 x i8>, ptr [[TMP21]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP22]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], [[WIDE_LOAD1]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD4]], [[WIDE_LOAD5]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], [[WIDE_LOAD6]] | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], [[WIDE_LOAD7]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = or <4 x i1> [[TMP4]], [[TMP11]] | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = or <4 x i1> [[TMP14]], [[TMP12]] | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = or <4 x i1> [[TMP15]], [[TMP13]] | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP16]]) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq i64 [[INDEX_NEXT]], 64 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = or i1 [[TMP5]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP10:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP13]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = add i64 12, [[TMP33]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP12]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = add i64 8, [[TMP35]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = icmp ne i64 [[TMP35]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = select i1 [[TMP23]], i64 [[TMP24]], i64 [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP11]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 4, [[TMP26]] | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = icmp ne i64 [[TMP26]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = select i1 [[TMP27]], i64 [[TMP28]], i64 [[TMP25]] | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP4]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = add i64 0, [[TMP30]] | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = icmp ne i64 [[TMP30]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = select i1 [[TMP31]], i64 [[TMP32]], i64 [[TMP29]] | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = add i64 [[INDEX]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = add i64 3, [[TMP9]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_EARLY_EXIT:%.*]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 67, [[MIDDLE_BLOCK]] ], [ 3, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_EARLY_EXIT]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[IV_NEXT]], 67 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP]], label [[LOOP_END]], !llvm.loop [[LOOP11:![0-9]+]] | 
 | ; VF4IC4:       loop.early.exit: | 
 | ; VF4IC4-NEXT:    [[RETVAL1:%.*]] = phi i64 [ [[IV]], [[LOOP]] ], [ [[TMP10]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL1]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL2:%.*]] = phi i64 [ 67, [[LOOP_INC]] ], [ 67, [[MIDDLE_BLOCK]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL2]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 3, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.early.exit | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, 1 | 
 |   %exitcond = icmp ne i64 %iv.next, 67 | 
 |   br i1 %exitcond, label %loop, label %loop.end | 
 |  | 
 | loop.early.exit: | 
 |   %retval1 = phi i64 [ %iv, %loop ] | 
 |   ret i64 %retval1 | 
 |  | 
 | loop.end: | 
 |   %retval2 = phi i64 [ 67, %loop.inc ] | 
 |   ret i64 %retval2 | 
 | } | 
 |  | 
 | define i64 @diff_exit_block_post_inc_use1() { | 
 | ; VF4IC4-LABEL: define i64 @diff_exit_block_post_inc_use1() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = add i64 3, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD4:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP3]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP19]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP20]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD6:%.*]] = load <4 x i8>, ptr [[TMP21]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP22]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], [[WIDE_LOAD1]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD4]], [[WIDE_LOAD5]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], [[WIDE_LOAD6]] | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], [[WIDE_LOAD7]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = or <4 x i1> [[TMP4]], [[TMP11]] | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = or <4 x i1> [[TMP14]], [[TMP12]] | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = or <4 x i1> [[TMP15]], [[TMP13]] | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP16]]) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq i64 [[INDEX_NEXT]], 64 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = or i1 [[TMP5]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP12:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP13]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = add i64 12, [[TMP33]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP12]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = add i64 8, [[TMP35]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = icmp ne i64 [[TMP35]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = select i1 [[TMP23]], i64 [[TMP24]], i64 [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP11]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 4, [[TMP26]] | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = icmp ne i64 [[TMP26]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = select i1 [[TMP27]], i64 [[TMP28]], i64 [[TMP25]] | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP4]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = add i64 0, [[TMP30]] | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = icmp ne i64 [[TMP30]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = select i1 [[TMP31]], i64 [[TMP32]], i64 [[TMP29]] | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = add i64 [[INDEX]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = add i64 3, [[TMP9]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_EARLY_EXIT:%.*]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 67, [[MIDDLE_BLOCK]] ], [ 3, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_EARLY_EXIT]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[IV_NEXT]], 67 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP]], label [[LOOP_END]], !llvm.loop [[LOOP13:![0-9]+]] | 
 | ; VF4IC4:       loop.early.exit: | 
 | ; VF4IC4-NEXT:    [[RETVAL1:%.*]] = phi i64 [ [[IV]], [[LOOP]] ], [ [[TMP10]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL1]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL2:%.*]] = phi i64 [ [[IV_NEXT]], [[LOOP_INC]] ], [ 67, [[MIDDLE_BLOCK]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL2]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 3, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.early.exit | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, 1 | 
 |   %exitcond = icmp ne i64 %iv.next, 67 | 
 |   br i1 %exitcond, label %loop, label %loop.end | 
 |  | 
 | loop.early.exit: | 
 |   %retval1 = phi i64 [ %iv, %loop ] | 
 |   ret i64 %retval1 | 
 |  | 
 | loop.end: | 
 |   %retval2 = phi i64 [ %iv.next, %loop.inc ] | 
 |   ret i64 %retval2 | 
 | } | 
 |  | 
 | define i64 @same_exit_block_pre_inc_use1_reverse() { | 
 | ; VF4IC4-LABEL: define i64 @same_exit_block_pre_inc_use1_reverse() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = sub i64 1023, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -4 | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -8 | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = getelementptr inbounds i8, ptr [[TMP14]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -12 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP16]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE2:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD1]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD9:%.*]] = load <4 x i8>, ptr [[TMP13]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE10:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD9]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD11:%.*]] = load <4 x i8>, ptr [[TMP15]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE12:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD11]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD13:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE14:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD13]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = getelementptr inbounds i8, ptr [[TMP25]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = getelementptr inbounds i8, ptr [[TMP26]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = getelementptr inbounds i8, ptr [[TMP25]], i32 -4 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = getelementptr inbounds i8, ptr [[TMP28]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = getelementptr inbounds i8, ptr [[TMP25]], i32 -8 | 
 | ; VF4IC4-NEXT:    [[TMP44:%.*]] = getelementptr inbounds i8, ptr [[TMP30]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP45:%.*]] = getelementptr inbounds i8, ptr [[TMP25]], i32 -12 | 
 | ; VF4IC4-NEXT:    [[TMP46:%.*]] = getelementptr inbounds i8, ptr [[TMP45]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP27]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE8:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD7]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD10:%.*]] = load <4 x i8>, ptr [[TMP29]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE11:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD10]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD12:%.*]] = load <4 x i8>, ptr [[TMP44]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE13:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD12]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD14:%.*]] = load <4 x i8>, ptr [[TMP46]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE15:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD14]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp ne <4 x i8> [[REVERSE2]], [[REVERSE8]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = icmp ne <4 x i8> [[REVERSE10]], [[REVERSE11]] | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = icmp ne <4 x i8> [[REVERSE12]], [[REVERSE13]] | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = icmp ne <4 x i8> [[REVERSE14]], [[REVERSE15]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = or <4 x i1> [[TMP6]], [[TMP19]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = or <4 x i1> [[TMP22]], [[TMP20]] | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = or <4 x i1> [[TMP23]], [[TMP21]] | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP24]]) | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1008 | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = or i1 [[TMP7]], [[TMP8]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP9]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP14:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 false, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[TMP41:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP21]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP42:%.*]] = add i64 12, [[TMP41]] | 
 | ; VF4IC4-NEXT:    [[TMP43:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP20]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = add i64 8, [[TMP43]] | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = icmp ne i64 [[TMP43]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = select i1 [[TMP31]], i64 [[TMP32]], i64 [[TMP42]] | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP19]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP36:%.*]] = add i64 4, [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = icmp ne i64 [[TMP34]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP37:%.*]] = select i1 [[TMP35]], i64 [[TMP36]], i64 [[TMP33]] | 
 | ; VF4IC4-NEXT:    [[TMP38:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP6]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP40:%.*]] = add i64 0, [[TMP38]] | 
 | ; VF4IC4-NEXT:    [[TMP39:%.*]] = icmp ne i64 [[TMP38]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = select i1 [[TMP39]], i64 [[TMP40]], i64 [[TMP37]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = add i64 [[INDEX]], [[TMP10]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = sub i64 1023, [[TMP11]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 15, [[MIDDLE_BLOCK]] ], [ 1023, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], -1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], 0 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP_END]], label [[LOOP]], !llvm.loop [[LOOP15:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi i64 [ [[IV]], [[LOOP]] ], [ 1024, [[LOOP_INC]] ], [ 1024, [[MIDDLE_BLOCK]] ], [ [[TMP12]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i64 [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 1023, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, -1 | 
 |   %exitcond = icmp eq i64 %iv.next, 0 | 
 |   br i1 %exitcond, label %loop.end, label %loop | 
 |  | 
 | loop.end: | 
 |   %retval = phi i64 [ %iv, %loop ], [ 1024, %loop.inc ] | 
 |   ret i64 %retval | 
 | } | 
 |  | 
 | ; FIXME: Extracts incorrect lane if early exit is taken. | 
 | define i8 @same_exit_block_use_loaded_value() { | 
 | ; VF4IC4-LABEL: define i8 @same_exit_block_use_loaded_value() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP3:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP1]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP10]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD2:%.*]] = load <4 x i8>, ptr [[TMP3]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 4 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 8 | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 12 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD4:%.*]] = load <4 x i8>, ptr [[TMP19]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP29]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD6:%.*]] = load <4 x i8>, ptr [[TMP8]], align 1 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP9]], align 1 | 
 | ; VF4IC4-NEXT:    [[TMP4:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD]], [[WIDE_LOAD4]] | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD1]], [[WIDE_LOAD5]] | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD2]], [[WIDE_LOAD6]] | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = icmp ne <4 x i8> [[WIDE_LOAD3]], [[WIDE_LOAD7]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = or <4 x i1> [[TMP4]], [[TMP11]] | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = or <4 x i1> [[TMP14]], [[TMP12]] | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = or <4 x i1> [[TMP15]], [[TMP13]] | 
 | ; VF4IC4-NEXT:    [[TMP5:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP16]]) | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1024 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = or i1 [[TMP5]], [[TMP6]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP7]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP16:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP5]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 true, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE1:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP13]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = add i64 12, [[FIRST_ACTIVE_LANE1]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE8:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP12]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = add i64 8, [[FIRST_ACTIVE_LANE8]] | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE8]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = select i1 [[TMP21]], i64 [[TMP22]], i64 [[TMP20]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE9:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP11]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = add i64 4, [[FIRST_ACTIVE_LANE9]] | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE9]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = select i1 [[TMP24]], i64 [[TMP25]], i64 [[TMP23]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE10:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP4]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 0, [[FIRST_ACTIVE_LANE10]] | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE10]], 4 | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE:%.*]] = select i1 [[TMP27]], i64 [[TMP28]], i64 [[TMP26]] | 
 | ; VF4IC4-NEXT:    [[EARLY_EXIT_VALUE:%.*]] = extractelement <4 x i8> [[WIDE_LOAD]], i64 [[FIRST_ACTIVE_LANE]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 1024, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], 1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], 1024 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP_END]], label [[LOOP]], !llvm.loop [[LOOP17:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi i8 [ [[LD1]], [[LOOP]] ], [ -1, [[LOOP_INC]] ], [ -1, [[MIDDLE_BLOCK]] ], [ [[EARLY_EXIT_VALUE]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i8 [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 0, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, 1 | 
 |   %exitcond = icmp eq i64 %iv.next, 1024 | 
 |   br i1 %exitcond, label %loop.end, label %loop | 
 |  | 
 | loop.end: | 
 |   %retval = phi i8 [ %ld1, %loop ], [ -1, %loop.inc ] | 
 |   ret i8 %retval | 
 | } | 
 |  | 
 | ; FIXME: Extracts incorrect lane if early exit is taken. | 
 | define i8 @same_exit_block_reverse_use_loaded_value() { | 
 | ; VF4IC4-LABEL: define i8 @same_exit_block_reverse_use_loaded_value() { | 
 | ; VF4IC4-NEXT:  entry: | 
 | ; VF4IC4-NEXT:    [[P1:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    [[P2:%.*]] = alloca [1024 x i8], align 1 | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P1]], i64 1024) | 
 | ; VF4IC4-NEXT:    call void @init_mem(ptr [[P2]], i64 1024) | 
 | ; VF4IC4-NEXT:    br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] | 
 | ; VF4IC4:       vector.ph: | 
 | ; VF4IC4-NEXT:    br label [[VECTOR_BODY:%.*]] | 
 | ; VF4IC4:       vector.body: | 
 | ; VF4IC4-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ] | 
 | ; VF4IC4-NEXT:    [[OFFSET_IDX:%.*]] = sub i64 1023, [[INDEX]] | 
 | ; VF4IC4-NEXT:    [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP10:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -4 | 
 | ; VF4IC4-NEXT:    [[TMP11:%.*]] = getelementptr inbounds i8, ptr [[TMP10]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP18:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -8 | 
 | ; VF4IC4-NEXT:    [[TMP37:%.*]] = getelementptr inbounds i8, ptr [[TMP18]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP7:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i32 -12 | 
 | ; VF4IC4-NEXT:    [[TMP8:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD:%.*]] = load <4 x i8>, ptr [[TMP2]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD1:%.*]] = load <4 x i8>, ptr [[TMP11]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE2:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD1]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD3:%.*]] = load <4 x i8>, ptr [[TMP37]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE4:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD3]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD5:%.*]] = load <4 x i8>, ptr [[TMP8]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE6:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD5]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[TMP9:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[OFFSET_IDX]] | 
 | ; VF4IC4-NEXT:    [[TMP38:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i32 0 | 
 | ; VF4IC4-NEXT:    [[TMP39:%.*]] = getelementptr inbounds i8, ptr [[TMP38]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP12:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i32 -4 | 
 | ; VF4IC4-NEXT:    [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[TMP12]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP14:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i32 -8 | 
 | ; VF4IC4-NEXT:    [[TMP15:%.*]] = getelementptr inbounds i8, ptr [[TMP14]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[TMP16:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i32 -12 | 
 | ; VF4IC4-NEXT:    [[TMP17:%.*]] = getelementptr inbounds i8, ptr [[TMP16]], i32 -3 | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD7:%.*]] = load <4 x i8>, ptr [[TMP39]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE8:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD7]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD9:%.*]] = load <4 x i8>, ptr [[TMP13]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE10:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD9]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD11:%.*]] = load <4 x i8>, ptr [[TMP15]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE12:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD11]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[WIDE_LOAD13:%.*]] = load <4 x i8>, ptr [[TMP17]], align 1 | 
 | ; VF4IC4-NEXT:    [[REVERSE14:%.*]] = shufflevector <4 x i8> [[WIDE_LOAD13]], <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> | 
 | ; VF4IC4-NEXT:    [[TMP6:%.*]] = icmp ne <4 x i8> [[REVERSE]], [[REVERSE8]] | 
 | ; VF4IC4-NEXT:    [[TMP19:%.*]] = icmp ne <4 x i8> [[REVERSE2]], [[REVERSE10]] | 
 | ; VF4IC4-NEXT:    [[TMP20:%.*]] = icmp ne <4 x i8> [[REVERSE4]], [[REVERSE12]] | 
 | ; VF4IC4-NEXT:    [[TMP21:%.*]] = icmp ne <4 x i8> [[REVERSE6]], [[REVERSE14]] | 
 | ; VF4IC4-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 16 | 
 | ; VF4IC4-NEXT:    [[TMP22:%.*]] = or <4 x i1> [[TMP6]], [[TMP19]] | 
 | ; VF4IC4-NEXT:    [[TMP23:%.*]] = or <4 x i1> [[TMP22]], [[TMP20]] | 
 | ; VF4IC4-NEXT:    [[TMP24:%.*]] = or <4 x i1> [[TMP23]], [[TMP21]] | 
 | ; VF4IC4-NEXT:    [[TMP25:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP24]]) | 
 | ; VF4IC4-NEXT:    [[TMP26:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1008 | 
 | ; VF4IC4-NEXT:    [[TMP27:%.*]] = or i1 [[TMP25]], [[TMP26]] | 
 | ; VF4IC4-NEXT:    br i1 [[TMP27]], label [[MIDDLE_SPLIT:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP18:![0-9]+]] | 
 | ; VF4IC4:       middle.split: | 
 | ; VF4IC4-NEXT:    br i1 [[TMP25]], label [[VECTOR_EARLY_EXIT:%.*]], label [[MIDDLE_BLOCK:%.*]] | 
 | ; VF4IC4:       middle.block: | 
 | ; VF4IC4-NEXT:    br i1 false, label [[LOOP_END:%.*]], label [[SCALAR_PH]] | 
 | ; VF4IC4:       vector.early.exit: | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE1:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP21]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP28:%.*]] = add i64 12, [[FIRST_ACTIVE_LANE1]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE15:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP20]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP30:%.*]] = add i64 8, [[FIRST_ACTIVE_LANE15]] | 
 | ; VF4IC4-NEXT:    [[TMP29:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE15]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP31:%.*]] = select i1 [[TMP29]], i64 [[TMP30]], i64 [[TMP28]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE16:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP19]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP33:%.*]] = add i64 4, [[FIRST_ACTIVE_LANE16]] | 
 | ; VF4IC4-NEXT:    [[TMP32:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE16]], 4 | 
 | ; VF4IC4-NEXT:    [[TMP34:%.*]] = select i1 [[TMP32]], i64 [[TMP33]], i64 [[TMP31]] | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE17:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v4i1(<4 x i1> [[TMP6]], i1 true) | 
 | ; VF4IC4-NEXT:    [[TMP36:%.*]] = add i64 0, [[FIRST_ACTIVE_LANE17]] | 
 | ; VF4IC4-NEXT:    [[TMP35:%.*]] = icmp ne i64 [[FIRST_ACTIVE_LANE17]], 4 | 
 | ; VF4IC4-NEXT:    [[FIRST_ACTIVE_LANE:%.*]] = select i1 [[TMP35]], i64 [[TMP36]], i64 [[TMP34]] | 
 | ; VF4IC4-NEXT:    [[EARLY_EXIT_VALUE:%.*]] = extractelement <4 x i8> [[REVERSE]], i64 [[FIRST_ACTIVE_LANE]] | 
 | ; VF4IC4-NEXT:    br label [[LOOP_END]] | 
 | ; VF4IC4:       scalar.ph: | 
 | ; VF4IC4-NEXT:    [[BC_RESUME_VAL:%.*]] = phi i64 [ 15, [[MIDDLE_BLOCK]] ], [ 1023, [[ENTRY:%.*]] ] | 
 | ; VF4IC4-NEXT:    br label [[LOOP:%.*]] | 
 | ; VF4IC4:       loop: | 
 | ; VF4IC4-NEXT:    [[IV:%.*]] = phi i64 [ [[IV_NEXT:%.*]], [[LOOP_INC:%.*]] ], [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ] | 
 | ; VF4IC4-NEXT:    [[GEP_P1:%.*]] = getelementptr inbounds i8, ptr [[P1]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD1:%.*]] = load i8, ptr [[GEP_P1]], align 1 | 
 | ; VF4IC4-NEXT:    [[GEP_P2:%.*]] = getelementptr inbounds i8, ptr [[P2]], i64 [[IV]] | 
 | ; VF4IC4-NEXT:    [[LD2:%.*]] = load i8, ptr [[GEP_P2]], align 1 | 
 | ; VF4IC4-NEXT:    [[CMP3:%.*]] = icmp eq i8 [[LD1]], [[LD2]] | 
 | ; VF4IC4-NEXT:    br i1 [[CMP3]], label [[LOOP_INC]], label [[LOOP_END]] | 
 | ; VF4IC4:       loop.inc: | 
 | ; VF4IC4-NEXT:    [[IV_NEXT]] = add i64 [[IV]], -1 | 
 | ; VF4IC4-NEXT:    [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], 0 | 
 | ; VF4IC4-NEXT:    br i1 [[EXITCOND]], label [[LOOP_END]], label [[LOOP]], !llvm.loop [[LOOP19:![0-9]+]] | 
 | ; VF4IC4:       loop.end: | 
 | ; VF4IC4-NEXT:    [[RETVAL:%.*]] = phi i8 [ [[LD1]], [[LOOP]] ], [ -1, [[LOOP_INC]] ], [ -1, [[MIDDLE_BLOCK]] ], [ [[EARLY_EXIT_VALUE]], [[VECTOR_EARLY_EXIT]] ] | 
 | ; VF4IC4-NEXT:    ret i8 [[RETVAL]] | 
 | ; | 
 | entry: | 
 |   %p1 = alloca [1024 x i8] | 
 |   %p2 = alloca [1024 x i8] | 
 |   call void @init_mem(ptr %p1, i64 1024) | 
 |   call void @init_mem(ptr %p2, i64 1024) | 
 |   br label %loop | 
 |  | 
 | loop: | 
 |   %iv = phi i64 [ %iv.next, %loop.inc ], [ 1023, %entry ] | 
 |   %gep.p1 = getelementptr inbounds i8, ptr %p1, i64 %iv | 
 |   %ld1 = load i8, ptr %gep.p1, align 1 | 
 |   %gep.p2 = getelementptr inbounds i8, ptr %p2, i64 %iv | 
 |   %ld2 = load i8, ptr %gep.p2, align 1 | 
 |   %cmp3 = icmp eq i8 %ld1, %ld2 | 
 |   br i1 %cmp3, label %loop.inc, label %loop.end | 
 |  | 
 | loop.inc: | 
 |   %iv.next = add i64 %iv, -1 | 
 |   %exitcond = icmp eq i64 %iv.next, 0 | 
 |   br i1 %exitcond, label %loop.end, label %loop | 
 |  | 
 | loop.end: | 
 |   %retval = phi i8 [ %ld1, %loop ], [ -1, %loop.inc ] | 
 |   ret i8 %retval | 
 | } |