1 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
3 %"class.std::bitset" = type { [8 x i8] }
5 define zeroext i1 @_Z3fooPjmS_mRSt6bitsetILm32EE(ptr nocapture %a, i64 %asize, ptr nocapture %b, i64 %bsize, ptr %bits) nounwind readonly ssp noredzone {
9 for.cond: ; preds = %for.inc, %entry
10 %0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
11 %conv = zext i32 %0 to i64
12 %cmp = icmp eq i64 %conv, %bsize
13 br i1 %cmp, label %return, label %for.body
15 for.body: ; preds = %for.cond
16 %arrayidx = getelementptr inbounds i32, ptr %b, i64 %conv
17 %tmp5 = load i32, ptr %arrayidx, align 4
18 %conv6 = zext i32 %tmp5 to i64
19 %rem.i.i.i.i = and i64 %conv6, 63
20 %tmp3.i = load i64, ptr %bits, align 8
21 %shl.i.i = shl i64 1, %rem.i.i.i.i
22 %and.i = and i64 %shl.i.i, %tmp3.i
23 %cmp.i = icmp eq i64 %and.i, 0
24 br i1 %cmp.i, label %for.inc, label %return
26 for.inc: ; preds = %for.body
30 return: ; preds = %for.body, %for.cond
32 %retval.0 = phi i1 [ true, %for.body ], [ false, %for.cond ]
36 ; This test case caused an assertion failure; see PR9324.
37 define void @func_37() noreturn nounwind ssp {
39 br i1 undef, label %lbl_919, label %entry.for.inc_crit_edge
41 entry.for.inc_crit_edge: ; preds = %entry
44 lbl_919: ; preds = %for.cond7.preheader, %entry
45 br label %for.cond7.preheader
47 for.cond7.preheader: ; preds = %for.inc, %lbl_919
48 %storemerge.ph = phi i8 [ 0, %lbl_919 ], [ %add, %for.inc ]
49 br i1 undef, label %for.inc, label %lbl_919
51 for.inc: ; preds = %for.cond7.preheader, %entry.for.inc_crit_edge
52 %add = add i8 undef, 1
53 br label %for.cond7.preheader