For PR1913:

Convert to new test system. This exposes test/Transforms/ConstProp/calls.ll

llvm-svn: 36027
This commit is contained in:
Reid Spencer 2007-04-14 23:04:54 +00:00
parent c8ff09ffaa
commit bc7533c140
9 changed files with 31 additions and 22 deletions

View File

@ -4,7 +4,8 @@
; Fix #2: The unary not instruction now no longer exists. Change to xor.
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'int 0'
; RUN: llvm-upgrade < $test | llvm-as | opt -constprop | llvm-dis | \
; RUN: not grep {int 0}
int "test1"() {
%R = xor int 123, -1

View File

@ -1,4 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'ret bool false'
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: not grep {ret bool false}
%b = external global [2 x { }]

View File

@ -1,5 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'i32 -1' &&
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep zeroinitializer
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: grep {i32 -1}
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: not grep zeroinitializer
< 4 x uint> %test() {
%tmp40 = bitcast <2 x long> bitcast (<4 x int> < int 0, int 0, int -1, int 0 > to <2 x long>) to <4 x uint>

View File

@ -1,4 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret i1 false'
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
; RUN: grep {ret i1 false}
bool %test() {
%X = trunc uint 320 to bool
ret bool %X

View File

@ -1,5 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 -1' &&
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 1'
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: grep {ret i32 -1}
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: grep {ret i32 1}
int %test1() {
%A = sext bool true to int

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llvm-dis | grep 'global i32 0'
; RUN: llvm-as < %s | llvm-dis | grep {global i32 0}
; PR1215
@G = global i32 sdiv (i32 0, i32 -1)

View File

@ -1,25 +1,25 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
declare double %cos(double)
declare double %sin(double)
declare double %tan(double)
declare double %sqrt(double)
declare bool %llvm.isunordered(double, double)
declare double %cos.f64(double)
declare double %sin.f64(double)
declare double %tan.f64(double)
declare double %sqrt.f64(double)
declare bool %llvm.isunordered.f64(double, double)
double %T() {
%A = call double %cos(double 0.0)
%B = call double %sin(double 0.0)
%A = call double %cos.f64(double 0.0)
%B = call double %sin.f64(double 0.0)
%a = add double %A, %B
%C = call double %tan(double 0.0)
%C = call double %tan.f64(double 0.0)
%b = add double %a, %C
%D = call double %sqrt(double 4.0)
%D = call double %sqrt.f64(double 4.0)
%c = add double %b, %D
ret double %c
}
bool %TNAN() {
%A = call bool %llvm.isunordered(double 0x7FF8000000000000, double 1.0) ;; it's a nan!
%B = call bool %llvm.isunordered(double 123.0, double 1.0)
%A = call bool %llvm.isunordered.f64(double 0x7FF8000000000000, double 1.0) ;; it's a nan!
%B = call bool %llvm.isunordered.f64(double 123.0, double 1.0)
%C = or bool %A, %B
ret bool %C
}

View File

@ -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}]]

View File

@ -1,4 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep -F 'ret i32* null' | wc -l | grep 2
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN: grep -F {ret i32* null} | wc -l | grep 2
int* %test1() {
%X = cast float 0.0 to int*
ret int* %X