mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
For PR1319:
Upgrade to new Tcl exec based test framework. This exposes three regressions in llvm-upgrade: test/Assembler/2002-08-19-BytecodeReader.llx test/Assembler/2003-08-21-ConstantExprCast-Fold.llx test/Assembler/2004-01-11-getelementptrfolding.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b477f7dd65
commit
90008f4bee
@ -5,8 +5,9 @@
|
||||
; of the bug that was causing the Olden Health benchmark to output incorrect
|
||||
; results!
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 && \
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | \
|
||||
; RUN: llvm-dis > %t.2
|
||||
; RUN: diff %t.1 %t.2
|
||||
|
||||
implementation
|
||||
|
@ -4,14 +4,15 @@
|
||||
; Check by running globaldce, which will remove the constant if there are
|
||||
; no references to it!
|
||||
;
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep constant
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | \
|
||||
; RUN: not grep constant
|
||||
;
|
||||
|
||||
%v1 = internal constant int 5
|
||||
|
||||
implementation
|
||||
|
||||
int "createtask"()
|
||||
int "createtask"() begin
|
||||
%v1 = alloca int ;; Alloca should have one use!
|
||||
%reg112 = load int* %v1 ;; This load should not use the global!
|
||||
ret int %reg112
|
||||
|
@ -1,6 +1,7 @@
|
||||
; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too
|
||||
; long. The type resolution code needs to be sped up a lot.
|
||||
; RUN: ulimit -t 20; llvm-upgrade < %s | llvm-as
|
||||
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f
|
||||
; END.
|
||||
|
||||
%ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)*
|
||||
%BBOX = type { %BBOX_VECT, %BBOX_VECT }
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep ' bitcast ('
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep { bitcast (}
|
||||
|
||||
%.Base64_1 = external constant [4 x sbyte]
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep 'getelementptr.*getelementptr'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
|
||||
; RUN: not grep {getelementptr.*getelementptr}
|
||||
|
||||
%struct.TUVVertex = type { short, short, short, short }
|
||||
%struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] }
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \
|
||||
; RUN: grep 'Cannot create a null initialized value of this type'
|
||||
; Test for PR463. This program is erroneous, but should not crash llvm-as.
|
||||
; RUN: ignore llvm-as < %s -o /dev/null -f |& \
|
||||
; RUN: grep {Cannot create a null initialized value of this type}
|
||||
|
||||
@.FOO = internal global %struct.none zeroinitializer
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep '%G = alloca int'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
|
||||
; RUN: not grep {%G = alloca int}
|
||||
|
||||
; In this testcase, %bar stores to the global G. Make sure that inlining does
|
||||
; not cause it to store to the G in main instead.
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f 2>&1 | grep "constant invalid for type"
|
||||
; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f |& \
|
||||
; RUN: grep {constant invalid for type}
|
||||
; XFAIL: *
|
||||
|
||||
;; This is a testcase for PR409
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep '1.0'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 1.0
|
||||
|
||||
double %test() {
|
||||
ret double 1.0 ;; This should not require hex notation
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \
|
||||
; RUN: ignore llvm-as < %s -o /dev/null -f |& \
|
||||
; RUN: grep "LLVM functions cannot return aggregate types"
|
||||
|
||||
define void @test() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
|
||||
; RUN: grep 'tail call void ({ }\* sret'
|
||||
; RUN: grep {tail call void (\{ \}\\* sret}
|
||||
|
||||
declare csretcc void %foo({}*, ...)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 'icmp ne'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep {icmp ne}
|
||||
bool %main(int %X) {
|
||||
%res = cast bool true to bool
|
||||
ret bool %res
|
||||
|
@ -1,7 +1,8 @@
|
||||
; For PR1093: This test checks that llvm-upgrade correctly translates
|
||||
; the llvm.va_* intrinsics to their cannonical argument form (i8*).
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
|
||||
; RUN: grep ' bitcast' | wc -l | grep 5
|
||||
; RUN: grep { bitcast} | wc -l | grep 5
|
||||
|
||||
%str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1]
|
||||
|
||||
implementation ; Functions:
|
||||
|
@ -1,6 +1,5 @@
|
||||
; PR1117
|
||||
; RUN: llvm-as < %s 2>&1 > /dev/null | \
|
||||
; RUN: grep "invalid cast opcode for cast from"
|
||||
; RUN: llvm-as < %s -o /dev/null -f |& grep "invalid cast opcode for cast from"
|
||||
|
||||
define i8* @nada(i64 %X) {
|
||||
%result = trunc i64 %X to i8*
|
||||
|
@ -1,5 +1,4 @@
|
||||
; PR1117
|
||||
; RUN: llvm-as < %s 2>&1 > /dev/null | \
|
||||
; RUN: grep "invalid cast opcode for cast from"
|
||||
; RUN: llvm-as < %s -o /dev/null -f |& grep "invalid cast opcode for cast from"
|
||||
|
||||
@X = constant i8* trunc (i64 0 to i8*)
|
||||
|
@ -1,7 +1,6 @@
|
||||
; PR1137
|
||||
; RUN: llvm-upgrade < %s &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f &&
|
||||
; RUN: llvm-upgrade < %s | grep 'tmp = alloca' | wc -l | grep 1
|
||||
; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f
|
||||
; RUN: llvm-upgrade < %s | grep {tmp = alloca} | wc -l | grep 1
|
||||
;
|
||||
target datalayout = "e-p:32:32"
|
||||
target endian = little
|
||||
|
@ -1,11 +1,11 @@
|
||||
; Test that upgrading shift instructions and constant expressions works
|
||||
; correctly.
|
||||
; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 2' &&
|
||||
; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 2' &&
|
||||
; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 2' &&
|
||||
; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 6' &&
|
||||
; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 1' &&
|
||||
; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 1'
|
||||
; RUN: llvm-upgrade < %s | grep {ashr i32 .X, 2}
|
||||
; RUN: llvm-upgrade < %s | grep {lshr i32 .X, 2}
|
||||
; RUN: llvm-upgrade < %s | grep {shl i32 .X, 2}
|
||||
; RUN: llvm-upgrade < %s | grep {ashr i32 .X, 6}
|
||||
; RUN: llvm-upgrade < %s | grep {lshr i32 .X, 1}
|
||||
; RUN: llvm-upgrade < %s | grep {shl i32 .X, 1}
|
||||
|
||||
void %test(int %X) {
|
||||
%A = ashr int %X, ubyte 2
|
||||
|
@ -1,6 +1,6 @@
|
||||
; PR1256
|
||||
; RUN: llvm-upgrade < %s | grep 'call void @f( i32 .tmp )'
|
||||
; RUN: llvm-upgrade < %s | grep 'call void @g( i8 .tmp\.upgrd\.2 )'
|
||||
; RUN: llvm-upgrade < %s | grep {call void @f( i32 .tmp )}
|
||||
; RUN: llvm-upgrade < %s | grep {call void @g( i8 .tmp\.upgrd\.2 )}
|
||||
|
||||
target datalayout = "e-p:32:32"
|
||||
target endian = little
|
||||
|
@ -1,5 +1,5 @@
|
||||
; Test whether negative values > 64 bits retain their negativeness.
|
||||
; RUN: llvm-as < %s | llvm-dis | grep 'add i65.*, -1'
|
||||
; RUN: llvm-as < %s | llvm-dis | grep {add i65.*, -1}
|
||||
|
||||
define i65 @testConsts(i65 %N) {
|
||||
%a = add i65 %N, -1
|
||||
|
@ -1,3 +1,3 @@
|
||||
load_lib llvm-dg.exp
|
||||
load_lib llvm.exp
|
||||
|
||||
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
|
||||
|
Loading…
Reference in New Issue
Block a user