]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll
[X86][AVX] Added (V)MOVDDUP / (V)MOVSLDUP / (V)MOVSHDUP memory folding + tests.
[opencl/llvm.git] / test / CodeGen / X86 / 2006-10-19-SwitchUnnecessaryBranching.ll
1 ; RUN: llc < %s -march=x86 -asm-verbose | FileCheck %s
3 @str = internal constant [14 x i8] c"Hello world!\0A\00"                ; <[14 x i8]*> [#uses=1]
4 @str.upgrd.1 = internal constant [13 x i8] c"Blah world!\0A\00"         ; <[13 x i8]*> [#uses=1]
6 define i32 @test(i32 %argc, i8** %argv) nounwind {
7 entry:
8 ; CHECK: cmpl   $2
9 ; CHECK-NEXT: jne
10 ; CHECK-NEXT: %bb2
12         switch i32 %argc, label %UnifiedReturnBlock [
13                  i32 1, label %bb
14                  i32 2, label %bb2
15         ]
17 bb:             ; preds = %entry
18         %tmp1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([14 x i8]* @str, i32 0, i64 0) )          ; <i32> [#uses=0]
19         ret i32 0
21 bb2:            ; preds = %entry
22         %tmp4 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([13 x i8]* @str.upgrd.1, i32 0, i64 0) )          ; <i32> [#uses=0]
23         ret i32 0
25 UnifiedReturnBlock:             ; preds = %entry
26         ret i32 0
27 }
29 declare i32 @printf(i8*, ...)