mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
New testcase, SROA with variable array index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b31a828533
commit
6c84e795ea
16
test/Transforms/ScalarRepl/sroa_two.ll
Normal file
16
test/Transforms/ScalarRepl/sroa_two.ll
Normal file
@ -0,0 +1,16 @@
|
||||
; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis
|
||||
|
||||
implementation
|
||||
|
||||
int %test(int %X) {
|
||||
%Arr = alloca [2 x int]
|
||||
%tmp.0 = getelementptr [2 x int]* %Arr, int 0, int 0
|
||||
store int 1, int* %tmp.0
|
||||
%tmp.1 = getelementptr [2 x int]* %Arr, int 0, int 1
|
||||
store int 2, int* %tmp.1
|
||||
|
||||
;; This should turn into a select instruction.
|
||||
%tmp.3 = getelementptr [2 x int]* %Arr, int 0, int %X
|
||||
%tmp.4 = load int* %tmp.3
|
||||
ret int %tmp.4
|
||||
}
|
Loading…
Reference in New Issue
Block a user