1 ; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s 2 3 define i32 @main() nounwind readnone { 4 entry: 5 %x = alloca i32, align 4 ; <i32*> [#uses=2] 6 volatile store i32 2, i32* %x, align 4 7 %0 = volatile load i32* %x, align 4 ; <i32> [#uses=1] 8 ; CHECK: lui $3, %hi($JTI0_0) 9 ; CHECK: sll $2, $2, 2 10 ; CHECK: addiu $3, $3, %lo($JTI0_0) 11 switch i32 %0, label %bb4 [ 12 i32 0, label %bb5 13 i32 1, label %bb1 14 i32 2, label %bb2 15 i32 3, label %bb3 16 ] 17 18 bb1: ; preds = %entry 19 ret i32 2 20 21 ; CHECK: $BB0_2 22 bb2: ; preds = %entry 23 ret i32 0 24 25 bb3: ; preds = %entry 26 ret i32 3 27 28 bb4: ; preds = %entry 29 ret i32 4 30 31 bb5: ; preds = %entry 32 ret i32 1 33 } 34