• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static     < %s | FileCheck %s -check-prefix=ci
2
3@i = global i32 0, align 4
4@j = common global i32 0, align 4
5@k = common global i32 0, align 4
6
7; Function Attrs: nounwind optsize
8define i32 @foo() #0 {
9entry:
10  %0 = load i32, i32* @i, align 4, !tbaa !1
11  %cmp = icmp eq i32 %0, 0
12  br i1 %cmp, label %if.then, label %if.else
13
14if.then:                                          ; preds = %entry
15  tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !5
16  br label %if.end
17
18if.else:                                          ; preds = %entry
19  tail call void asm sideeffect ".space 1004", ""() #1, !srcloc !6
20  br label %if.end
21
22if.end:                                           ; preds = %if.else, %if.then
23  %storemerge = phi i32 [ 1, %if.else ], [ 0, %if.then ]
24  store i32 %storemerge, i32* @i, align 4, !tbaa !1
25  ret i32 0
26}
27
28; ci:	beqz	$3, $BB0_2
29; ci: # BB#1:                                 # %if.else
30
31
32; Function Attrs: nounwind optsize
33define i32 @goo() #0 {
34entry:
35  %0 = load i32, i32* @i, align 4, !tbaa !1
36  %cmp = icmp eq i32 %0, 0
37  br i1 %cmp, label %if.then, label %if.else
38
39if.then:                                          ; preds = %entry
40  tail call void asm sideeffect ".space 1000000", ""() #1, !srcloc !7
41  br label %if.end
42
43if.else:                                          ; preds = %entry
44  tail call void asm sideeffect ".space 1000004", ""() #1, !srcloc !8
45  br label %if.end
46
47if.end:                                           ; preds = %if.else, %if.then
48  %storemerge = phi i32 [ 1, %if.else ], [ 0, %if.then ]
49  store i32 %storemerge, i32* @i, align 4, !tbaa !1
50  ret i32 0
51}
52
53; ci:	bnez	$3, $BB1_1  # 16 bit inst
54; ci:	jal	$BB1_2	# branch
55; ci:	nop
56; ci: $BB1_1:                                 # %if.else
57
58attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
59attributes #1 = { nounwind }
60
61
62!1 = !{!2, !2, i64 0}
63!2 = !{!"int", !3, i64 0}
64!3 = !{!"omnipotent char", !4, i64 0}
65!4 = !{!"Simple C/C++ TBAA"}
66!5 = !{i32 58}
67!6 = !{i32 108}
68!7 = !{i32 190}
69!8 = !{i32 243}
70