blob: 83b8a250c20c48b12888779aaa5298a55aee8ef3 [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]
Chris Lattnerd2bf4322011-11-27 06:54:59 +00006 store volatile i32 2, i32* %x, align 4
7 %0 = load volatile i32* %x, align 4 ; <i32> [#uses=1]
Bruno Cardoso Lopes46773792010-07-20 08:37:04 +00008; CHECK: lui $3, %hi($JTI0_0)
Bruno Cardoso Lopes46773792010-07-20 08:37:04 +00009; CHECK: addiu $3, $3, %lo($JTI0_0)
Dan Gohman8c2d2702011-10-24 17:45:02 +000010; CHECK: sll $2, $2, 2
Bruno Cardoso Lopes46773792010-07-20 08:37:04 +000011 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}