mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Add testcase for new instcombine xform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
; The %A getelementptr instruction should be eliminated here
|
; The %A getelementptr instruction should be eliminated here
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A'
|
; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A '
|
||||||
; RUN: then exit 1
|
; RUN: then exit 1
|
||||||
; RUN: else exit 0
|
; RUN: else exit 0
|
||||||
; RUN: fi
|
; RUN: fi
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
int *"foo1"(int * %I) { ; Test noop elimination
|
int *%foo1(int* %I) { ; Test noop elimination
|
||||||
%A = getelementptr int* %I, long 0
|
%A = getelementptr int* %I, long 0
|
||||||
ret int * %A
|
ret int * %A
|
||||||
}
|
}
|
||||||
@@ -42,3 +42,9 @@ int* %foo6() {
|
|||||||
%B = getelementptr int* %A, long 2
|
%B = getelementptr int* %A, long 2
|
||||||
ret int* %B
|
ret int* %B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int* %foo7(int* %I, long %C, long %D) {
|
||||||
|
%A = getelementptr int* %I, long %C
|
||||||
|
%B = getelementptr int* %A, long %D
|
||||||
|
ret int* %B
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user