annotate test/CodeGen/AVR/select-mbb-placement-bug.ll @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llc -mcpu=atmega328p < %s -march=avr | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; CHECK-LABEL: loopy
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 define internal fastcc void @loopy() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; In this case, when we expand `Select8`/`Select16`, we should be
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; replacing the existing MBB instead of adding a new one.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ; https://github.com/avr-rust/rust/issues/49
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 ; CHECK: LBB0_{{[0-9]+}}:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 ; CHECK: LBB0_{{[0-9]+}}:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 ; CHECK-NOT: LBB0_{{[0-9]+}}:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 start:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 br label %bb7.preheader
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 bb7.preheader: ; preds = %bb10, %start
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 %i = phi i8 [ 0, %start ], [ %j, %bb10 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 %j = phi i8 [ 1, %start ], [ %next, %bb10 ]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 br label %bb10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 bb4: ; preds = %bb10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 bb10: ; preds = %bb7.preheader
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 tail call fastcc void @observe(i8 %i, i8 1)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 %0 = icmp ult i8 %j, 20
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 %1 = zext i1 %0 to i8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 %next = add i8 %j, %1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 br i1 %0, label %bb7.preheader, label %bb4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 declare void @observe(i8, i8);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35