mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4563 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08db719c4b
commit
a434ae74e7
20
test/Transforms/DSAnalysis/badcases.ll
Normal file
20
test/Transforms/DSAnalysis/badcases.ll
Normal file
@ -0,0 +1,20 @@
|
||||
; This file contains a list of situations where node folding should happen...
|
||||
|
||||
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
|
||||
}
|
||||
|
21
test/Transforms/DSAnalysis/goodcases.ll
Normal file
21
test/Transforms/DSAnalysis/goodcases.ll
Normal file
@ -0,0 +1,21 @@
|
||||
; This file contains a list of cases where node folding should NOT happen
|
||||
;
|
||||
|
||||
implementation
|
||||
|
||||
void %test1({int, int}* %X) {
|
||||
getelementptr {int, int} * %X, long 0
|
||||
%Y = cast {int, int}* %X to uint*
|
||||
store uint 5, uint* %Y
|
||||
ret void
|
||||
}
|
||||
|
||||
; Test that "structural" equality works. Pointers can land in pointers n
|
||||
; stuff.
|
||||
void %test2({int*, int*}* %X) {
|
||||
getelementptr {int*, int*}* %X, long 0
|
||||
%Y = cast {int*, int*}* %X to {uint*, long*}*
|
||||
getelementptr {uint*, long*}* %Y, long 0
|
||||
ret void
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user