mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
For PR1913:
Convert to new test system. This exposes test/Transforms/ConstProp/calls.ll llvm-svn: 36027
This commit is contained in:
parent
87995a803b
commit
6460b25da9
@ -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
|
||||
|
@ -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 { }]
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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}]]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user