mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
4f7ae85eda
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6900 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
614 B
LLVM
20 lines
614 B
LLVM
; Promoting some values allows promotion of other values.
|
|
; RUN: if as < %s | opt -mem2reg | dis | grep alloca
|
|
; RUN: then exit 1
|
|
; RUN: else exit 0
|
|
; RUN: fi
|
|
|
|
int %test2() {
|
|
%result = alloca int ; ty=int*
|
|
%a = alloca int ; ty=int*
|
|
%p = alloca int* ; ty=int**
|
|
store int 0, int* %a
|
|
store int* %a, int** %p
|
|
%tmp.0 = load int** %p ; ty=int*
|
|
%tmp.1 = load int* %tmp.0 ; ty=int
|
|
store int %tmp.1, int* %result
|
|
%tmp.2 = load int* %result ; ty=int
|
|
ret int %tmp.2
|
|
}
|
|
|