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