Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / CorrelatedExprs / switch.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
2
3 int %test_case_values_should_propagate(int %A) {
4     switch int %A, label %D [
5         int 40, label %C1
6         int 41, label %C2
7         int 42, label %C3
8     ]
9 C1:
10     %REMOVE1 = add int %A, 2     ; Should be 42.
11     ret int %REMOVE1
12 C2:
13     %REMOVE2 = add int %A, 3     ; Should be 44.
14     ret int %REMOVE2
15 C3:
16     %REMOVE3 = add int %A, 4     ; Should be 46.
17     ret int %REMOVE3
18 D:
19     ret int 10
20 }