1 ; RUN: opt < %s -passes=instcombine -S
3 ; Make sure that we don't crash when optimizing the vectors of pointers.
5 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
6 target triple = "x86_64-apple-macosx10.8.0"
8 %struct.hoge = type { ptr, ptr, ptr, ptr }
10 define void @widget(ptr nocapture %arg, i1 %c1, i1 %c2, i1 %c3, i1 %c4, i1 %c5) {
12 br i1 %c1, label %bb1, label %bb17
15 br i1 %c2, label %bb2, label %bb3
21 %tmp5 = load <2 x ptr>, ptr %arg, align 8
22 %tmp6 = ptrtoint <2 x ptr> %tmp5 to <2 x i64>
23 %tmp7 = sub <2 x i64> zeroinitializer, %tmp6
24 %tmp8 = ashr exact <2 x i64> %tmp7, <i64 3, i64 3>
25 %tmp9 = extractelement <2 x i64> %tmp8, i32 0
26 %tmp10 = add nsw i64 0, %tmp9
27 br i1 %c5, label %bb11, label %bb12
35 bb13: ; preds = %bb12, %bb11
36 br i1 %c3, label %bb16, label %bb14
39 br i1 %c4, label %bb16, label %bb15
44 bb16: ; preds = %bb15, %bb14, %bb13
47 bb17: ; preds = %bb2, %bb