mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
21a82e6fc7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29924 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
615 B
LLVM
23 lines
615 B
LLVM
; This file contains a list of situations where node folding should happen...
|
|
;
|
|
; RUN: llvm-as < %s | opt -analyze -tddatastructure
|
|
|
|
implementation
|
|
|
|
void %test1({int, int} * %X) {
|
|
getelementptr {int, int} * %X, long 0
|
|
%Y = cast {int, int} * %X to sbyte*
|
|
%Z = getelementptr sbyte* %Y, long 7
|
|
store sbyte 6, sbyte *%Z
|
|
ret void
|
|
}
|
|
|
|
void %test2({int, int} * %X) {
|
|
getelementptr {int, int} * %X, long 0
|
|
%Y = cast {int, int} * %X to {sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte} *
|
|
%Z = getelementptr {sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte}* %Y, long 0, ubyte 7
|
|
store sbyte 6, sbyte *%Z
|
|
ret void
|
|
}
|
|
|