1; RUN: llc -march=mips < %s | FileCheck %s -check-prefix=O32 2; RUN: llc -march=mips64 -target-abi=n32 < %s | FileCheck %s -check-prefix=N32 3; RUN: llc -march=mips64 < %s | FileCheck %s -check-prefix=N64 4 5; We only use the '$' prefix on O32. The others use the ELF convention. 6; O32: $JTI0_0 7; N32: .LJTI0_0 8; N64: .LJTI0_0 9 10; Check basic block labels while we're at it. 11; O32: $BB0_2: 12; N32: .LBB0_2: 13; N64: .LBB0_2: 14 15@.str = private unnamed_addr constant [2 x i8] c"A\00", align 1 16@.str.1 = private unnamed_addr constant [2 x i8] c"B\00", align 1 17@.str.2 = private unnamed_addr constant [2 x i8] c"C\00", align 1 18@.str.3 = private unnamed_addr constant [2 x i8] c"D\00", align 1 19@.str.4 = private unnamed_addr constant [2 x i8] c"E\00", align 1 20@.str.5 = private unnamed_addr constant [2 x i8] c"F\00", align 1 21@.str.6 = private unnamed_addr constant [2 x i8] c"G\00", align 1 22@.str.7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 23 24define i8* @_Z3fooi(i32 signext %Letter) { 25entry: 26 %retval = alloca i8*, align 8 27 %Letter.addr = alloca i32, align 4 28 store i32 %Letter, i32* %Letter.addr, align 4 29 %0 = load i32, i32* %Letter.addr, align 4 30 switch i32 %0, label %sw.epilog [ 31 i32 0, label %sw.bb 32 i32 1, label %sw.bb1 33 i32 2, label %sw.bb2 34 i32 3, label %sw.bb3 35 i32 4, label %sw.bb4 36 i32 5, label %sw.bb5 37 i32 6, label %sw.bb6 38 ] 39 40sw.bb: 41 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8** %retval, align 8 42 br label %return 43 44sw.bb1: 45 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8** %retval, align 8 46 br label %return 47 48sw.bb2: 49 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8** %retval, align 8 50 br label %return 51 52sw.bb3: 53 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0), i8** %retval, align 8 54 br label %return 55 56sw.bb4: 57 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8** %retval, align 8 58 br label %return 59 60sw.bb5: 61 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8** %retval, align 8 62 br label %return 63 64sw.bb6: 65 store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8** %retval, align 8 66 br label %return 67 68sw.epilog: 69 store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i32 0, i32 0), i8** %retval, align 8 70 br label %return 71 72return: 73 %1 = load i8*, i8** %retval, align 8 74 ret i8* %1 75} 76