63 lines · plain
1; Test that the instructions have the correct whitespace.2; RUN: llc -mtriple=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck -strict-whitespace %s -check-prefix=163; RUN: llc -mtriple=mips -mcpu=mips32r2 < %s | FileCheck %s -strict-whitespace -check-prefix=32R24 5@main.L = internal unnamed_addr constant [5 x ptr] [ptr blockaddress(@main, %L1), ptr blockaddress(@main, %L2), ptr blockaddress(@main, %L3), ptr blockaddress(@main, %L4), ptr null], align 46@str = private unnamed_addr constant [2 x i8] c"A\00"7@str5 = private unnamed_addr constant [2 x i8] c"B\00"8@str6 = private unnamed_addr constant [2 x i8] c"C\00"9@str7 = private unnamed_addr constant [2 x i8] c"D\00"10@str8 = private unnamed_addr constant [2 x i8] c"E\00"11 12define i32 @main() nounwind {13entry:14; 16: jalrc ${{[0-9]+}}15; 16: jrc ${{[0-9]+}}16; 16: jrc $ra17 %puts = tail call i32 @puts(ptr @str)18 br label %L119 20L1: ; preds = %entry, %L321 %i.0 = phi i32 [ 0, %entry ], [ %inc, %L3 ]22 %puts5 = tail call i32 @puts(ptr @str5)23 br label %L224 25L2: ; preds = %L1, %L326 %i.1 = phi i32 [ %i.0, %L1 ], [ %inc, %L3 ]27 %puts6 = tail call i32 @puts(ptr @str6)28 br label %L329 30L3: ; preds = %L2, %L331 %i.2 = phi i32 [ %i.1, %L2 ], [ %inc, %L3 ]32 %puts7 = tail call i32 @puts(ptr @str7)33 %inc = add i32 %i.2, 134 %arrayidx = getelementptr inbounds [5 x ptr], ptr @main.L, i32 0, i32 %i.235 %0 = load ptr, ptr %arrayidx, align 436 indirectbr ptr %0, [label %L1, label %L2, label %L3, label %L4]37L4: ; preds = %L338 %puts8 = tail call i32 @puts(ptr @str8)39 ret i32 040}41 42declare i32 @puts(ptr nocapture) nounwind43 44define i32 @ext(i32 %s, i32 %pos, i32 %sz) nounwind readnone {45entry:46; 32R2: ext ${{[0-9]+}}, $4, 5, 947 %shr = lshr i32 %s, 548 %and = and i32 %shr, 51149 ret i32 %and50}51 52define void @ins(i32 %s, ptr nocapture %d) nounwind {53entry:54; 32R2: ins ${{[0-9]+}}, $4, 5, 955 %and = shl i32 %s, 556 %shl = and i32 %and, 1635257 %tmp3 = load i32, ptr %d, align 458 %and5 = and i32 %tmp3, -1635359 %or = or i32 %and5, %shl60 store i32 %or, ptr %d, align 461 ret void62}63