mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
d6aa02de10
to a few tests where it is required for the expected transformation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77290 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
371 B
LLVM
14 lines
371 B
LLVM
; Test folding of constantexpr geps into normal geps.
|
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {icmp eq i64 %X, -1}
|
|
; PR2235
|
|
|
|
%S = type { i32, [ 100 x i32] }
|
|
|
|
define i1 @test(i64 %X, %S* %P) {
|
|
%A = getelementptr inbounds %S* %P, i32 0, i32 1, i64 %X
|
|
%B = getelementptr inbounds %S* %P, i32 0, i32 0
|
|
%C = icmp eq i32* %A, %B
|
|
ret i1 %C
|
|
}
|
|
|