mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
08af6fd5fc
Convert to use the new Tcl expr based test harness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36061 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
528 B
LLVM
23 lines
528 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -cee -constprop -instcombine -dce | \
|
|
; RUN: llvm-dis | not grep REMOVE
|
|
; END.
|
|
|
|
int %test_case_values_should_propagate(int %A) {
|
|
switch int %A, label %D [
|
|
int 40, label %C1
|
|
int 41, label %C2
|
|
int 42, label %C3
|
|
]
|
|
C1:
|
|
%REMOVE1 = add int %A, 2 ; Should be 42.
|
|
ret int %REMOVE1
|
|
C2:
|
|
%REMOVE2 = add int %A, 3 ; Should be 44.
|
|
ret int %REMOVE2
|
|
C3:
|
|
%REMOVE3 = add int %A, 4 ; Should be 46.
|
|
ret int %REMOVE3
|
|
D:
|
|
ret int 10
|
|
}
|