Mark the SPU 'lr' instruction to never have side effects.
[oota-llvm.git] / test / CodeGen / CellSPU / jumptable.ll
1 ;RUN: llc --march=cellspu %s -o - | FileCheck %s
2 ; This is to check that emitting jumptables doesn't crash llc
3 define i32 @test(i32 %param) {
4 entry:
5 ;CHECK:        ai      {{\$.}}, $3, -1
6 ;CHECK:        clgti   {{\$., \$.}}, 3
7 ;CHECK:        brnz    {{\$.}},.LBB0_2
8   switch i32 %param, label %bb1 [
9     i32 1, label %bb3
10     i32 2, label %bb2
11     i32 3, label %bb3
12     i32 4, label %bb1
13   ]
14
15 bb1:                                            
16   ret i32 1
17 bb2:      
18   ret i32 2
19 bb3:     
20   ret i32 3
21 }