llvm.org GIT mirror llvm / 94302cb
[MergeICmp][NFC] Make test tuple-four-int8.ll more readable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315062 91177308-0d34-0410-b5e6-96231b3b80d8 Clement Courbet 2 years ago
1 changed file(s) with 32 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
1919 %"class.std::tuple"* nocapture readonly dereferenceable(4) %a,
2020 %"class.std::tuple"* nocapture readonly dereferenceable(4) %b) local_unnamed_addr #1 {
2121 entry:
22 %0 = getelementptr inbounds %"class.std::tuple", %"class.std::tuple"* %a, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0
23 %add.ptr.i.i.i.i.i = getelementptr inbounds i8, i8* %0, i64 3
24 %1 = load i8, i8* %add.ptr.i.i.i.i.i, align 1
25 %2 = getelementptr inbounds %"class.std::tuple", %"class.std::tuple"* %b, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0
26 %add.ptr.i.i.i6.i.i = getelementptr inbounds i8, i8* %2, i64 3
27 %3 = load i8, i8* %add.ptr.i.i.i6.i.i, align 1
28 %cmp.i.i = icmp eq i8 %1, %3
29 br i1 %cmp.i.i, label %land.rhs.i.i, label %opeq.exit
22 %a.base = getelementptr inbounds %"class.std::tuple", %"class.std::tuple"* %a, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0
23 %a.elem3.addr = getelementptr inbounds i8, i8* %a.base, i64 3
24 %0 = load i8, i8* %a.elem3.addr, align 1
25 %b.base = getelementptr inbounds %"class.std::tuple", %"class.std::tuple"* %b, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0
26 %b.elem3.addr = getelementptr inbounds i8, i8* %b.base, i64 3
27 %1 = load i8, i8* %b.elem3.addr, align 1
28 %cmp.elem3 = icmp eq i8 %0, %1
29 br i1 %cmp.elem3, label %land.elem2, label %opeq.exit
3030
31 land.rhs.i.i:
32 %add.ptr.i.i.i.i.i.i = getelementptr inbounds i8, i8* %0, i64 2
33 %4 = load i8, i8* %add.ptr.i.i.i.i.i.i, align 1
34 %add.ptr.i.i.i6.i.i.i = getelementptr inbounds i8, i8* %2, i64 2
35 %5 = load i8, i8* %add.ptr.i.i.i6.i.i.i, align 1
36 %cmp.i.i.i = icmp eq i8 %4, %5
37 br i1 %cmp.i.i.i, label %land.rhs.i.i.i, label %opeq.exit
31 land.elem2:
32 %a.elem2.addr = getelementptr inbounds i8, i8* %a.base, i64 2
33 %2 = load i8, i8* %a.elem2.addr, align 1
34 %b.elem2.addr = getelementptr inbounds i8, i8* %b.base, i64 2
35 %3 = load i8, i8* %b.elem2.addr, align 1
36 %cmp.elem2 = icmp eq i8 %2, %3
37 br i1 %cmp.elem2, label %land.elem1, label %opeq.exit
3838
39 land.rhs.i.i.i:
40 %add.ptr.i.i.i.i.i.i.i = getelementptr inbounds i8, i8* %0, i64 1
41 %6 = load i8, i8* %add.ptr.i.i.i.i.i.i.i, align 1
42 %add.ptr.i.i.i6.i.i.i.i = getelementptr inbounds i8, i8* %2, i64 1
43 %7 = load i8, i8* %add.ptr.i.i.i6.i.i.i.i, align 1
44 %cmp.i.i.i.i = icmp eq i8 %6, %7
45 br i1 %cmp.i.i.i.i, label %land.rhs.i.i.i.i, label %opeq.exit
39 land.elem1:
40 %a.elem1.addr = getelementptr inbounds i8, i8* %a.base, i64 1
41 %4 = load i8, i8* %a.elem1.addr, align 1
42 %b.elem1.addr = getelementptr inbounds i8, i8* %b.base, i64 1
43 %5 = load i8, i8* %b.elem1.addr, align 1
44 %cmp.elem1 = icmp eq i8 %4, %5
45 br i1 %cmp.elem1, label %land.elem0, label %opeq.exit
4646
47 land.rhs.i.i.i.i:
48 %8 = load i8, i8* %0, align 1
49 %9 = load i8, i8* %2, align 1
50 %cmp.i.i.i.i.i = icmp eq i8 %8, %9
47 land.elem0:
48 %6 = load i8, i8* %a.base, align 1
49 %7 = load i8, i8* %b.base, align 1
50 %cmp.elem0 = icmp eq i8 %6, %7
5151 br label %opeq.exit
5252
5353 opeq.exit:
54 %10 = phi i1 [ false, %entry ], [ false, %land.rhs.i.i ], [ false, %land.rhs.i.i.i ], [ %cmp.i.i.i.i.i, %land.rhs.i.i.i.i ]
55 ret i1 %10
54 %8 = phi i1 [ false, %entry ], [ false, %land.elem2 ], [ false, %land.elem1 ], [ %cmp.elem0, %land.elem0 ]
55 ret i1 %8
5656 ; CHECK-LABEL: @opeq(
5757 ; The entry block is kept as is, but the next block is now the merged comparison
5858 ; block for bytes [1,2] or the block for the head.
5959 ; CHECK: entry
60 ; CHECK: br i1 %cmp.i.i, label %land.rhs.i.i.i{{(.i)?}}, label %opeq.exit
60 ; CHECK: br i1 %cmp.elem3, label %land.elem{{[01]}}, label %opeq.exit
6161 ; The two 1 byte loads and compares at offset 1 are replaced with a single
6262 ; 2-byte memcmp.
63 ; CHECK: land.rhs.i.i.i
63 ; CHECK: land.elem1
6464 ; CHECK: @memcmp({{.*}}2)
6565 ; CHECK: icmp eq {{.*}} 0
6666 ; In the end we have three blocks.
6767 ; CHECK: phi i1
6868 ; CHECK-SAME %entry
69 ; CHECK-SAME %land.rhs.i.i.i.i
70 ; CHECK-SAME %land.rhs.i.i.i
69 ; CHECK-SAME %land.elem0
70 ; CHECK-SAME %land.elem1
7171 }
7272