Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/X86/phi-bit-propagation.ll @ 0:95c75e76d11b LLVM3.4
LLVM 3.4
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 13:56:28 +0900 |
parents | |
children | afa8332a0e37 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:95c75e76d11b |
---|---|
1 ; RUN: llc < %s -march=x86-64 | FileCheck %s | |
2 | |
3 %"class.std::bitset" = type { [8 x i8] } | |
4 | |
5 define zeroext i1 @_Z3fooPjmS_mRSt6bitsetILm32EE(i32* nocapture %a, i64 %asize, i32* nocapture %b, i64 %bsize, %"class.std::bitset"* %bits) nounwind readonly ssp noredzone { | |
6 entry: | |
7 %tmp.i.i.i.i = bitcast %"class.std::bitset"* %bits to i64* | |
8 br label %for.cond | |
9 | |
10 for.cond: ; preds = %for.inc, %entry | |
11 %0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] | |
12 %conv = zext i32 %0 to i64 | |
13 %cmp = icmp eq i64 %conv, %bsize | |
14 br i1 %cmp, label %return, label %for.body | |
15 | |
16 for.body: ; preds = %for.cond | |
17 %arrayidx = getelementptr inbounds i32* %b, i64 %conv | |
18 %tmp5 = load i32* %arrayidx, align 4 | |
19 %conv6 = zext i32 %tmp5 to i64 | |
20 %rem.i.i.i.i = and i64 %conv6, 63 | |
21 %tmp3.i = load i64* %tmp.i.i.i.i, align 8 | |
22 %shl.i.i = shl i64 1, %rem.i.i.i.i | |
23 %and.i = and i64 %shl.i.i, %tmp3.i | |
24 %cmp.i = icmp eq i64 %and.i, 0 | |
25 br i1 %cmp.i, label %for.inc, label %return | |
26 | |
27 for.inc: ; preds = %for.body | |
28 %inc = add i32 %0, 1 | |
29 br label %for.cond | |
30 | |
31 return: ; preds = %for.body, %for.cond | |
32 ; CHECK-NOT: and | |
33 %retval.0 = phi i1 [ true, %for.body ], [ false, %for.cond ] | |
34 ret i1 %retval.0 | |
35 } | |
36 | |
37 ; This test case caused an assertion failure; see PR9324. | |
38 define void @func_37() noreturn nounwind ssp { | |
39 entry: | |
40 br i1 undef, label %lbl_919, label %entry.for.inc_crit_edge | |
41 | |
42 entry.for.inc_crit_edge: ; preds = %entry | |
43 br label %for.inc | |
44 | |
45 lbl_919: ; preds = %for.cond7.preheader, %entry | |
46 br label %for.cond7.preheader | |
47 | |
48 for.cond7.preheader: ; preds = %for.inc, %lbl_919 | |
49 %storemerge.ph = phi i8 [ 0, %lbl_919 ], [ %add, %for.inc ] | |
50 br i1 undef, label %for.inc, label %lbl_919 | |
51 | |
52 for.inc: ; preds = %for.cond7.preheader, %entry.for.inc_crit_edge | |
53 %add = add i8 undef, 1 | |
54 br label %for.cond7.preheader | |
55 } |