diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/redundantswitch_fastcomp.ll | 28 | ||||
-rw-r--r-- | tests/cases/redundantswitch_fastcomp.txt | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/cases/redundantswitch_fastcomp.ll b/tests/cases/redundantswitch_fastcomp.ll new file mode 100644 index 00000000..5b797ac8 --- /dev/null +++ b/tests/cases/redundantswitch_fastcomp.ll @@ -0,0 +1,28 @@ +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:128-n32-S128" +target triple = "asmjs-unknown-emscripten" + +@.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1 + +declare i32 @printf(i8*, ...) + +define linkonce_odr i32 @main() align 2 { +entry: + %temp32 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 5) + switch i32 %temp32, label %mid1 [ + i32 1000, label %mid1 + i32 1001, label %mid2 + i32 2000, label %finish + ] + +mid1: + br label %finish + +mid2: + br label %finish + +finish: ; preds = %555 + %last = phi i32 [0, %entry], [1, %mid1], [2, %mid2] + %a333c = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %last) + ret i32 0 +} + diff --git a/tests/cases/redundantswitch_fastcomp.txt b/tests/cases/redundantswitch_fastcomp.txt new file mode 100644 index 00000000..72084b0c --- /dev/null +++ b/tests/cases/redundantswitch_fastcomp.txt @@ -0,0 +1,2 @@ +hello, world: 5 +hello, world: 1 |