; 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
; 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
; 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 }
-; 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]
-; 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] }
-; 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
-; 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.
-; 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
-; 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
-; 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() {
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
-; RUN: grep 'tail call void ({ }\* sret'
+; RUN: grep {tail call void (\{ \}\\* sret}
declare csretcc void %foo({}*, ...)
-; 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
; 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:
; 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*
; 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*)
; 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
; 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
; 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
; 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
-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}]]