blob: 07fc10cae1802c0b85398dcece81d1630c124c50 [file] [log] [blame]
Bruno Cardoso Lopes46773792010-07-20 08:37:04 +00001; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s
2
3define i32 @main() nounwind readnone {
4entry:
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
18bb1: ; preds = %entry
19 ret i32 2
20
21; CHECK: $BB0_2
22bb2: ; preds = %entry
23 ret i32 0
24
25bb3: ; preds = %entry
26 ret i32 3
27
28bb4: ; preds = %entry
29 ret i32 4
30
31bb5: ; preds = %entry
32 ret i32 1
33}