134 lines · plain
1; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static -mips16-constant-islands=true < %s | FileCheck %s -check-prefix=lcb2 3; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static -mips16-constant-islands=true < %s | FileCheck %s -check-prefix=lcbn4 5@i = global i32 0, align 46@j = common global i32 0, align 47@k = common global i32 0, align 48 9; Function Attrs: nounwind optsize10define i32 @bnez() #0 {11entry:12 %0 = load i32, ptr @i, align 4, !tbaa !113 %cmp = icmp eq i32 %0, 014 br i1 %cmp, label %if.then, label %if.end15 16if.then: ; preds = %entry17 tail call void asm sideeffect ".space 10000", ""() #1, !srcloc !518 store i32 0, ptr @i, align 4, !tbaa !119 br label %if.end20 21if.end: ; preds = %if.then, %entry22 ret i32 023}24; lcb: .ent bnez25; lcbn: .ent bnez26; lcb: bnez ${{[0-9]+}}, $BB{{[0-9]+}}_{{[0-9]+}}27; lcbn-NOT: bnez ${{[0-9]+}}, $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst28; lcb: .end bnez29; lcbn: .end bnez30 31; Function Attrs: nounwind optsize32define i32 @beqz() #0 {33entry:34 %0 = load i32, ptr @i, align 4, !tbaa !135 %cmp = icmp eq i32 %0, 036 br i1 %cmp, label %if.then, label %if.else37 38if.then: ; preds = %entry39 store i32 10, ptr @j, align 4, !tbaa !140 tail call void asm sideeffect ".space 10000", ""() #1, !srcloc !641 br label %if.end42 43if.else: ; preds = %entry44 store i32 55, ptr @j, align 4, !tbaa !145 tail call void asm sideeffect ".space 10000", ""() #1, !srcloc !746 br label %if.end47 48if.end: ; preds = %if.else, %if.then49 ret i32 050}51 52; lcb: .ent beqz53; lcbn: .ent beqz54; lcb: beqz ${{[0-9]+}}, $BB{{[0-9]+}}_{{[0-9]+}}55; lcbn-NOT: beqz ${{[0-9]+}}, $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst56; lcb: .end beqz57; lcbn: .end beqz58 59 60; Function Attrs: nounwind optsize61define void @bteqz() #0 {62entry:63 %0 = load i32, ptr @i, align 4, !tbaa !164 %1 = load i32, ptr @j, align 4, !tbaa !165 %cmp = icmp eq i32 %0, %166 br i1 %cmp, label %if.then, label %if.else67 68if.then: ; preds = %entry69 store i32 1, ptr @k, align 4, !tbaa !170 tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !871 br label %if.end72 73if.else: ; preds = %entry74 tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !975 store i32 2, ptr @k, align 4, !tbaa !176 br label %if.end77 78if.end: ; preds = %if.else, %if.then79 ret void80}81 82; lcb: .ent bteqz83; lcbn: .ent bteqz84; lcb: btnez $BB{{[0-9]+}}_{{[0-9]+}}85; lcbn-NOT: btnez $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst86; lcb: .end bteqz87; lcbn: .end bteqz88 89 90; Function Attrs: nounwind optsize91define void @btz() #0 {92entry:93 %0 = load i32, ptr @i, align 4, !tbaa !194 %1 = load i32, ptr @j, align 4, !tbaa !195 %cmp1 = icmp sgt i32 %0, %196 br i1 %cmp1, label %if.then, label %if.end97 98if.then: ; preds = %entry, %if.then99 tail call void asm sideeffect ".space 60000", ""() #1, !srcloc !10100 %2 = load i32, ptr @i, align 4, !tbaa !1101 %3 = load i32, ptr @j, align 4, !tbaa !1102 %cmp = icmp sgt i32 %2, %3103 br i1 %cmp, label %if.then, label %if.end104 105if.end: ; preds = %if.then, %entry106 ret void107}108 109; lcb: .ent btz110; lcbn: .ent btz111; lcb: bteqz $BB{{[0-9]+}}_{{[0-9]+}}112; lcbn-NOT: bteqz $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst113; lcb: btnez $BB{{[0-9]+}}_{{[0-9]+}}114; lcbn-NOT: btnez $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst115; lcb: .end btz116; lcbn: .end btz117 118attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }119attributes #1 = { nounwind }120 121!llvm.ident = !{!0}122 123!0 = !{!"clang version 3.5 (gitosis@dmz-portal.mips.com:clang.git ed197d08c90d82e1119774e10920e6f7a841c8ec) (gitosis@dmz-portal.mips.com:llvm.git b9235a363fa2dddb26ac01cbaed58efbc9eff392)"}124!1 = !{!2, !2, i64 0}125!2 = !{!"int", !3, i64 0}126!3 = !{!"omnipotent char", !4, i64 0}127!4 = !{!"Simple C/C++ TBAA"}128!5 = !{i32 59}129!6 = !{i32 156}130!7 = !{i32 210}131!8 = !{i32 299}132!9 = !{i32 340}133!10 = !{i32 412}134