1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -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 8 define i32 @foo() #0 { 9 entry: 10 %0 = load i32* @i, align 4, !tbaa !1 11 %cmp = icmp eq i32 %0, 0 12 br i1 %cmp, label %if.then, label %if.else 13 14 if.then: ; preds = %entry 15 tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !5 16 br label %if.end 17 18 if.else: ; preds = %entry 19 tail call void asm sideeffect ".space 1004", ""() #1, !srcloc !6 20 br label %if.end 21 22 if.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 33 define i32 @goo() #0 { 34 entry: 35 %0 = load i32* @i, align 4, !tbaa !1 36 %cmp = icmp eq i32 %0, 0 37 br i1 %cmp, label %if.then, label %if.else 38 39 if.then: ; preds = %entry 40 tail call void asm sideeffect ".space 1000000", ""() #1, !srcloc !7 41 br label %if.end 42 43 if.else: ; preds = %entry 44 tail call void asm sideeffect ".space 1000004", ""() #1, !srcloc !8 45 br label %if.end 46 47 if.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 58 attributes #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" } 59 attributes #1 = { nounwind } 60 61 62 !1 = metadata !{metadata !2, metadata !2, i64 0} 63 !2 = metadata !{metadata !"int", metadata !3, i64 0} 64 !3 = metadata !{metadata !"omnipotent char", metadata !4, i64 0} 65 !4 = metadata !{metadata !"Simple C/C++ TBAA"} 66 !5 = metadata !{i32 58} 67 !6 = metadata !{i32 108} 68 !7 = metadata !{i32 190} 69 !8 = metadata !{i32 243} 70