2011-03-11 22:52:04 +01:00
|
|
|
;RUN: llc --march=cellspu -disable-cgp-branch-opts %s -o - | FileCheck %s
|
2010-05-11 13:00:02 +02:00
|
|
|
; This is to check that emitting jumptables doesn't crash llc
|
|
|
|
define i32 @test(i32 %param) {
|
|
|
|
entry:
|
2010-06-21 17:08:16 +02:00
|
|
|
;CHECK: ai {{\$.}}, $3, -1
|
|
|
|
;CHECK: clgti {{\$., \$.}}, 3
|
2011-10-13 13:40:03 +02:00
|
|
|
;CHECK: brnz {{\$.}},.LBB0_
|
|
|
|
switch i32 %param, label %bb2 [
|
|
|
|
i32 1, label %bb1
|
2010-05-11 13:00:02 +02:00
|
|
|
i32 2, label %bb2
|
|
|
|
i32 3, label %bb3
|
2011-10-13 13:40:03 +02:00
|
|
|
i32 4, label %bb2
|
2010-05-11 13:00:02 +02:00
|
|
|
]
|
2011-10-13 13:40:03 +02:00
|
|
|
;CHECK-NOT: # BB#2
|
2010-05-11 13:00:02 +02:00
|
|
|
bb1:
|
|
|
|
ret i32 1
|
|
|
|
bb2:
|
|
|
|
ret i32 2
|
|
|
|
bb3:
|
2011-10-13 13:40:03 +02:00
|
|
|
ret i32 %param
|
2010-05-11 13:00:02 +02:00
|
|
|
}
|