mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
14 lines
353 B
LLVM
14 lines
353 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 %S* %P, i32 0, i32 1, i64 %X
|
||
|
%B = getelementptr %S* %P, i32 0, i32 0
|
||
|
%C = icmp eq i32* %A, %B
|
||
|
ret i1 %C
|
||
|
}
|
||
|
|