Convert tests using "| wc -l | grep ..." to use the count script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2007-08-15 13:36:28 +00:00
parent 7375bb9c8c
commit 28beeeac4d
228 changed files with 467 additions and 467 deletions

View File

@ -1,7 +1,7 @@
; Check to make sure that Value Numbering doesn't merge casts of different
; flavors.
; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \
; RUN: grep {\[sz\]ext} | wc -l | grep 2
; RUN: grep {\[sz\]ext} | count 2
declare void %external(int)

View File

@ -1,7 +1,7 @@
; 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} | count 5
%str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1]

View File

@ -1,6 +1,6 @@
; PR1137
; 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 | grep {tmp = alloca} | count 1
;
target datalayout = "e-p:32:32"
target endian = little

View File

@ -1,17 +1,17 @@
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xglobWeak | grep linkonce | wc -l | grep 1
// RUN: grep xglobWeak | grep linkonce | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextWeak | grep linkonce | wc -l | grep 1
// RUN: grep xextWeak | grep linkonce | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
// RUN: grep xWeaknoinline | grep weak | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
// RUN: grep xWeakextnoinline | grep weak | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xglobnoWeak | grep linkonce | wc -l | grep 1
// RUN: grep xglobnoWeak | grep linkonce | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: grep xstatnoWeak | grep internal | count 1
// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextnoWeak | grep linkonce | wc -l | grep 1
// RUN: grep xextnoWeak | grep linkonce | count 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | wc -l | grep 4
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | count 4
void *test1() {
return __builtin_return_address(1);

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | wc -l | grep 3
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3
void test(int* X, char *Y) {
memset(X, 4, 1000);

View File

@ -1,5 +1,5 @@
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32( i32} | wc -l | grep 2
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | wc -l | grep 1
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32( i32} | count 2
// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 1
unsigned t2(unsigned X) {
return __builtin_clz(X);

View File

@ -1,5 +1,5 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
// RUN: llvm-dis | grep {foo\[12345\]} | wc -l | grep 5
// RUN: llvm-dis | grep {foo\[12345\]} | count 5
__asm__ ("foo1");
__asm__ ("foo2");

View File

@ -1,19 +1,19 @@
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
// RUN: grep weak | wc -l | grep 1
// RUN: grep weak | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
// RUN: grep weak | wc -l | grep 1
// RUN: grep weak | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
// RUN: grep xWeaknoinline | grep weak | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
// RUN: grep xWeakextnoinline | grep weak | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: grep -v linkonce | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: grep xstatnoWeak | grep internal | count 1
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: grep -v linkonce | count 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;

View File

@ -1,19 +1,19 @@
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xglobWeak | grep extern_weak | wc -l | grep 1
// RUN: grep xglobWeak | grep extern_weak | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextWeak | grep weak | wc -l | grep 1
// RUN: grep xextWeak | grep weak | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
// RUN: grep xWeaknoinline | grep weak | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
// RUN: grep xWeakextnoinline | grep weak | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: grep -v linkonce | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
// RUN: grep xstatnoWeak | grep internal | count 1
// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
// RUN: grep -v linkonce | wc -l | grep 1
// RUN: grep -v linkonce | count 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;

View File

@ -3,4 +3,4 @@
void foo(int * __restrict myptr1, int * myptr2) {
myptr1[0] = 0;
myptr2[0] = 0;
}
}

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | wc -l | grep 5
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | count 5
struct abc {
int a;

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | count 1
; Check that calls to baz and quux are tail-merged.
; ModuleID = 'tail.c'

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*baz | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge | grep bl.*quux | count 1
; Check that calls to baz and quux are tail-merged.
; ModuleID = 'tail.c'

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm | grep bl.*baz | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep bl.*quux | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge=0 | grep bl.*baz | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge=0 | grep bl.*quux | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm | grep bl.*baz | count 1
; RUN: llvm-as < %s | llc -march=arm | grep bl.*quux | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge=0 | grep bl.*baz | count 2
; RUN: llvm-as < %s | llc -march=arm -enable-tail-merge=0 | grep bl.*quux | count 2
; Check that tail merging is the default on ARM, and that -enable-tail-merge=0 works.
; ModuleID = 'tail.c'

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | \
; RUN: grep {mov r0, r2} | wc -l | grep 1
; RUN: grep {mov r0, r2} | count 1
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | \
; RUN: grep {mov r0, r1} | wc -l | grep 1
; RUN: grep {mov r0, r1} | count 1
define i32 @f(i32 %a, i64 %b) {
%tmp = call i32 @g(i64 %b)

View File

@ -1,9 +1,9 @@
; RUN: llvm-as < %s | llc -march=arm > %t
; RUN: grep and %t | wc -l | grep 1
; RUN: grep orr %t | wc -l | grep 1
; RUN: grep eor %t | wc -l | grep 1
; RUN: grep mov.*lsl %t | wc -l | grep 1
; RUN: grep mov.*asr %t | wc -l | grep 1
; RUN: grep and %t | count 1
; RUN: grep orr %t | count 1
; RUN: grep eor %t | count 1
; RUN: grep mov.*lsl %t | count 1
; RUN: grep mov.*asr %t | count 1
define i32 @f1(i32 %a, i32 %b) {
entry:

View File

@ -1,17 +1,17 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0, #0} | wc -l | grep 1
; RUN: grep {mov r0, #0} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0, #255$} | wc -l | grep 1
; RUN: grep {mov r0, #255$} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0.*256} | wc -l | grep 1
; RUN: grep {mov r0.*256} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {orr.*256} | wc -l | grep 1
; RUN: grep {orr.*256} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0, .*-1073741761} | wc -l | grep 1
; RUN: grep {mov r0, .*-1073741761} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0, .*1008} | wc -l | grep 1
; RUN: grep {mov r0, .*1008} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {cmp r0, #1, 16} | wc -l | grep 1
; RUN: grep {cmp r0, #1, 16} | count 1
uint %f1() {
ret uint 0

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=arm | grep bic | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm | grep bic | count 2
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | \
; RUN: grep fneg | wc -l | grep 2
; RUN: grep fneg | count 2
define float @test1(float %x, double %y) {
%tmp = fpext float %x to double

View File

@ -1,10 +1,10 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t
; RUN: grep fmsr %t | wc -l | grep 4
; RUN: grep fmsr %t | count 4
; RUN: grep fsitos %t
; RUN: grep fmrs %t | wc -l | grep 2
; RUN: grep fmrs %t | count 2
; RUN: grep fsitod %t
; RUN: grep fmrrd %t | wc -l | grep 5
; RUN: grep fmdrr %t | wc -l | grep 2
; RUN: grep fmrrd %t | count 5
; RUN: grep fmdrr %t | count 2
; RUN: grep fldd %t
; RUN: grep fuitod %t
; RUN: grep fuitos %t

View File

@ -4,8 +4,8 @@
; RUN: grep movgt %t
; RUN: grep movge %t
; RUN: grep movne %t
; RUN: grep fcmped %t | wc -l | grep 1
; RUN: grep fcmpes %t | wc -l | grep 6
; RUN: grep fcmped %t | count 1
; RUN: grep fcmpes %t | count 6
int %f1(float %a) {
entry:

View File

@ -1,9 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {mov r0, #0} | wc -l | grep 1
; RUN: grep {mov r0, #0} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep {flds.*\\\[} | wc -l | grep 1
; RUN: grep {flds.*\\\[} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep {fsts.*\\\[} | wc -l | grep 1
; RUN: grep {fsts.*\\\[} | count 1
float %f1(float %a) {
ret float 0.000000e+00

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fmrs | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fmrs | count 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | not grep fmrrd
@i = weak global i32 0 ; <i32*> [#uses=2]

View File

@ -1,8 +1,8 @@
; RUN: llvm-as < %s | llc -march=arm
; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep mov | wc -l | grep 1
; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | grep mov | count 1
; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnu --disable-fp-elim | \
; RUN: grep mov | wc -l | grep 3
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep mov | wc -l | grep 2
; RUN: grep mov | count 3
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin | grep mov | count 2
@str = internal constant [12 x i8] c"Hello World\00"

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bx | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bx | count 1
define i32 @t1(i32 %a, i32 %b) {
%tmp2 = icmp eq i32 %a, 0

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxlt | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxgt | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxge | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxlt | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxgt | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bxge | count 1
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
%tmp2 = icmp sgt i32 %c, 10

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep cmpne | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bx | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep cmpne | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep bx | count 2
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
switch i32 %c, label %cond_next [

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep subgt | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep suble | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep subgt | count 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep suble | count 1
; FIXME: Check for # of unconditional branch after adding branch folding post ifcvt.
define i32 @t(i32 %a, i32 %b) {

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep blge | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -enable-arm-if-conversion | grep blge | count 1
@x = external global i32* ; <i32**> [#uses=1]

View File

@ -2,10 +2,10 @@
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep cmpne | wc -l | grep 1
; RUN: grep cmpne | count 1
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep ldmhi | wc -l | grep 1
; RUN: grep ldmhi | count 1
define void @foo(i32 %X, i32 %Y) {
entry:

View File

@ -2,13 +2,13 @@
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep cmpeq | wc -l | grep 1
; RUN: grep cmpeq | count 1
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep moveq | wc -l | grep 1
; RUN: grep moveq | count 1
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep ldmeq | wc -l | grep 1
; RUN: grep ldmeq | count 1
; FIXME: Need post-ifcvt branch folding to get rid of the extra br at end of BB1.
%struct.quad_struct = type { i32, i32, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct* }

View File

@ -2,7 +2,7 @@
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion
; RUN: llvm-as < %s | \
; RUN: llc -march=arm -mtriple=arm-apple-darwin -enable-arm-if-conversion | \
; RUN: grep ldmne | wc -l | grep 1
; RUN: grep ldmne | count 1
%struct.SString = type { i8*, i32, i32 }

View File

@ -1,6 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6
; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 |\
; RUN: grep mov | wc -l | grep 3
; RUN: grep mov | count 3
int %test(int %x) {
%tmp = cast int %x to short

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm
; RUN: llvm-as < %s | llc -march=thumb | grep {ldr.*LCP} | wc -l | grep 5
; RUN: llvm-as < %s | llc -march=thumb | grep {ldr.*LCP} | count 5
define void @test1() {
%tmp = alloca [ 64 x i32 ] , align 4

View File

@ -1,9 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep ldmia | wc -l | grep 2
; RUN: grep ldmia | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep ldmib | wc -l | grep 1
; RUN: grep ldmib | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | \
; RUN: grep {ldmfd sp\!} | wc -l | grep 3
; RUN: grep {ldmfd sp\!} | count 3
%X = external global [0 x int]

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {ldr r0} | wc -l | grep 3
; RUN: grep {ldr r0} | count 3
int %f1(int* %v) {
entry:

View File

@ -1,11 +1,11 @@
; RUN: llvm-as < %s | llc -march=arm | grep ldrb | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrh | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsb | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsh | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrb | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrh | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrsb | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrsh | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrb | count 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrh | count 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsb | count 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsh | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrb | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrh | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrsb | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep ldrsh | count 1
define i32 @test1(i8* %v.pntr.s0.u1) {
%tmp.u = load i8* %v.pntr.s0.u1

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm | not grep mov
; RUN: llvm-as < %s | llc -march=thumb | grep cpy | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=thumb | grep cpy | count 2
define i32 @f1() {
%buf = alloca [32 x i32], align 4

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {ldr.*\\\[.*\],} | wc -l | grep 1
; RUN: grep {ldr.*\\\[.*\],} | count 1
int %test(int %a, int %b, int %c) {
%tmp1 = mul int %a, %b

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {ldr.*\\!} | wc -l | grep 2
; RUN: grep {ldr.*\\!} | count 2
int *%test1(int *%X, int *%dest) {
%Y = getelementptr int* %X, int 4

View File

@ -3,13 +3,13 @@
; RUN: not grep {L_G\$non_lazy_ptr}
; RUN: llvm-as < %s | \
; RUN: llc -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
; RUN: grep {L_G\$non_lazy_ptr} | wc -l | grep 2
; RUN: grep {L_G\$non_lazy_ptr} | count 2
; RUN: llvm-as < %s | \
; RUN: llc -mtriple=arm-apple-darwin -relocation-model=pic | \
; RUN: grep {ldr.*pc} | wc -l | grep 1
; RUN: grep {ldr.*pc} | count 1
; RUN: llvm-as < %s | \
; RUN: llc -mtriple=arm-linux-gnueabi -relocation-model=pic | \
; RUN: grep {GOT} | wc -l | grep 1
; RUN: grep {GOT} | count 1
@G = external global i32

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm | grep cmp | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep cmp | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep cmp | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep cmp | count 1
define i1 @t1(i64 %x) {

View File

@ -1,20 +1,20 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep -- {-2147483648} | wc -l | grep 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | wc -l | grep 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adds | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adc | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep {subs } | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep sbc | wc -l | grep 1
; RUN: grep -- {-2147483648} | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adds | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep adc | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep {subs } | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep sbc | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep smull | wc -l | grep 1
; RUN: grep smull | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep umull | wc -l | grep 1
; RUN: grep umull | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
; RUN: grep mvn | wc -l | grep 1
; RUN: grep mvn | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
; RUN: grep adc | wc -l | grep 1
; RUN: grep adc | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
; RUN: grep sbc | wc -l | grep 1
; RUN: grep sbc | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | grep __muldi3
; END.

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=thumb
; RUN: llvm-as < %s | llc -march=arm > %t
; RUN: grep rrx %t | wc -l | grep 1
; RUN: grep rrx %t | count 1
; RUN: grep __ashldi3 %t
; RUN: grep __ashrdi3 %t
; RUN: grep __lshrdi3 %t

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm | grep mul | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm | grep lsl | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=thumb | grep mul | wc -l | grep 3
; RUN: llvm-as < %s | llc -march=thumb | grep lsl | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep mul | count 2
; RUN: llvm-as < %s | llc -march=arm | grep lsl | count 2
; RUN: llvm-as < %s | llc -march=thumb | grep mul | count 3
; RUN: llvm-as < %s | llc -march=thumb | grep lsl | count 1
define i32 @f1(i32 %u) {
%tmp = mul i32 %u, %u

View File

@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \
; RUN: grep smmul | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep umull | wc -l | grep 1
; RUN: grep smmul | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep umull | count 1
int %smulhi(int %x, int %y) {
%tmp = cast int %x to ulong ; <ulong> [#uses=1]

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | wc -l | grep 8
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mvn | count 8
; END.
int %f1() {

View File

@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \
; RUN: grep pkhbt | wc -l | grep 5
; RUN: grep pkhbt | count 5
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \
; RUN: grep pkhtb | wc -l | grep 4
; RUN: grep pkhtb | count 4
; END.
implementation ; Functions:

View File

@ -1,17 +1,17 @@
; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep movgt | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep movlt | wc -l | grep 3
; RUN: llvm-as < %s | llc -march=arm | grep movle | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep moveq | count 1
; RUN: llvm-as < %s | llc -march=arm | grep movgt | count 1
; RUN: llvm-as < %s | llc -march=arm | grep movlt | count 3
; RUN: llvm-as < %s | llc -march=arm | grep movle | count 1
; RUN: llvm-as < %s | llc -march=arm | grep movls | count 1
; RUN: llvm-as < %s | llc -march=arm | grep movhi | count 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fcpydmi | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep beq | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep bgt | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep blt | wc -l | grep 3
; RUN: llvm-as < %s | llc -march=thumb | grep ble | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep bls | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep bhi | wc -l | grep 1
; RUN: grep fcpydmi | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep beq | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep bgt | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep blt | count 3
; RUN: llvm-as < %s | llc -march=thumb | grep ble | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep bls | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep bhi | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep __ltdf2
define i32 @f1(i32 %a.s) {

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm
; RUN: llvm-as < %s | llc -march=arm | grep mov | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=arm | grep mov | count 2
define i32 @t1(i32 %a, i32 %b, i32 %c) {
%tmp1 = icmp sgt i32 %c, 10

View File

@ -1,11 +1,11 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | \
; RUN: grep smulbt | wc -l | grep 1
; RUN: grep smulbt | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | \
; RUN: grep smultt | wc -l | grep 1
; RUN: grep smultt | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v5TE | \
; RUN: grep smlabt | wc -l | grep 1
; RUN: grep smlabt | count 1
%x = weak global short 0
%y = weak global short 0

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm
; RUN: llvm-as < %s | llc -march=arm | grep add | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep add | count 1
; RUN: llvm-as < %s | llc -march=thumb
; RUN: llvm-as < %s | llc -march=thumb | grep add | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep add | count 1
define void @f1() {
%c = alloca i8, align 1

View File

@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {strh .*\\\[.*\], #-4} | wc -l | grep 1
; RUN: grep {strh .*\\\[.*\], #-4} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {str .*\\\[.*\],} | wc -l | grep 1
; RUN: grep {str .*\\\[.*\],} | count 1
short %test1(int *%X, short *%A) {
%Y = load int* %X

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep {str.*\\!} | wc -l | grep 2
; RUN: grep {str.*\\!} | count 2
void %test1(int *%X, int *%A, int **%dest) {
%B = load int* %A

View File

@ -1,7 +1,7 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep strb | wc -l | grep 1
; RUN: grep strb | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
; RUN: grep strh | wc -l | grep 1
; RUN: grep strh | count 1
void %test1(int %v, short* %ptr) {
%tmp = cast int %v to short

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
; RUN: grep sxtb | wc -l | grep 1
; RUN: grep sxtb | count 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
; RUN: grep sxtab | wc -l | grep 1
; RUN: grep sxtab | count 1
define i8 @test1(i32 %A) signext {
%B = lshr i32 %A, 8

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=arm | grep ldrb.*7 | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsb.*7 | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrb.*7 | count 1
; RUN: llvm-as < %s | llc -march=arm | grep ldrsb.*7 | count 1
%struct.A = type { i8, i8, i8, i8, i16, i8, i8, %struct.B** }
%struct.B = type { float, float, i32, i32, i32, [0 x i8] }

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm | grep movne | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep bne | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=thumb | grep beq | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep movne | count 1
; RUN: llvm-as < %s | llc -march=arm | grep moveq | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep bne | count 1
; RUN: llvm-as < %s | llc -march=thumb | grep beq | count 1
define i32 @f1(float %X, float %Y) {
%tmp = fcmp uno float %X, %Y

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxtb | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxtab | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxth | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxtb | count 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxtab | count 1
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep uxth | count 1
define i8 @test1(i32 %A.u) zeroext {
%B.u = trunc i32 %A.u to i8

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \
; RUN: grep uxt | wc -l | grep 10
; RUN: grep uxt | count 10
; END.
uint %test1(uint %x) {

View File

@ -1,6 +1,6 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb
; RUN: llvm-upgrade < %s | llvm-as | llc -march=thumb | \
; RUN: grep pop | wc -l | grep 2
; RUN: grep pop | count 2
%str = internal constant [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1]

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi | \
; RUN: grep {add sp, sp, #16} | wc -l | grep 1
; RUN: grep {add sp, sp, #16} | count 1
; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnu | \
; RUN: grep {add sp, sp, #12} | wc -l | grep 2
; RUN: grep {add sp, sp, #12} | count 2
define i32 @f(i32 %a, ...) {
entry:

View File

@ -1,19 +1,19 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fabs | wc -l | grep 2
; RUN: grep fabs | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fmscs | wc -l | grep 1
; RUN: grep fmscs | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fcvt | wc -l | grep 2
; RUN: grep fcvt | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fuito | wc -l | grep 2
; RUN: grep fuito | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fto.i | wc -l | grep 4
; RUN: grep fto.i | count 4
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep bmi | wc -l | grep 1
; RUN: grep bmi | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep bgt | wc -l | grep 1
; RUN: grep bgt | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \
; RUN: grep fcmpezs | wc -l | grep 1
; RUN: grep fcmpezs | count 1
void %test(float *%P, double* %D) {
%A = load float* %P

View File

@ -1,5 +1,5 @@
; There should be exactly two calls here (memset and malloc), no more.
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | wc -l | grep 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | count 2
%typedef.bc_struct = type opaque

View File

@ -1,21 +1,21 @@
;test all the shifted and signextending adds and subs with and without consts
;
; RUN: llvm-as < %s | llc -march=alpha -o %t.s -f
; RUN: grep { addl} %t.s | wc -l | grep 2
; RUN: grep { addq} %t.s | wc -l | grep 2
; RUN: grep { subl} %t.s | wc -l | grep 2
; RUN: grep { subq} %t.s | wc -l | grep 1
; RUN: grep { addl} %t.s | count 2
; RUN: grep { addq} %t.s | count 2
; RUN: grep { subl} %t.s | count 2
; RUN: grep { subq} %t.s | count 1
;
; RUN: grep {lda \$0,-100(\$16)} %t.s | wc -l | grep 1
; RUN: grep {s4addl} %t.s | wc -l | grep 2
; RUN: grep {s8addl} %t.s | wc -l | grep 2
; RUN: grep {s4addq} %t.s | wc -l | grep 2
; RUN: grep {s8addq} %t.s | wc -l | grep 2
; RUN: grep {lda \$0,-100(\$16)} %t.s | count 1
; RUN: grep {s4addl} %t.s | count 2
; RUN: grep {s8addl} %t.s | count 2
; RUN: grep {s4addq} %t.s | count 2
; RUN: grep {s8addq} %t.s | count 2
;
; RUN: grep {s4subl} %t.s | wc -l | grep 2
; RUN: grep {s8subl} %t.s | wc -l | grep 2
; RUN: grep {s4subq} %t.s | wc -l | grep 2
; RUN: grep {s8subq} %t.s | wc -l | grep 2
; RUN: grep {s4subl} %t.s | count 2
; RUN: grep {s8subl} %t.s | count 2
; RUN: grep {s4subq} %t.s | count 2
; RUN: grep {s8subq} %t.s | count 2
define i32 @al(i32 signext %x.s, i32 signext %y.s) signext {

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | wc -l | grep 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | count 2
bool %test1(ulong %A, ulong %B) {
%C = and ulong %A, 255

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | \
; RUN: grep __BITCAST | wc -l | grep 14
; RUN: grep __BITCAST | count 14
int %test1(float %F) {
%X = bitcast float %F to int

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | count 1
; PR964
sbyte* %FindChar(sbyte* %CurPtr) {

View File

@ -1,5 +1,5 @@
; PR1296
; RUN: llvm-as < %s | llc -march=x86 | grep {movl \$1} | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=x86 | grep {movl \$1} | count 1
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-apple-darwin8"

View File

@ -1,6 +1,6 @@
; PR925
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
; RUN: grep mov.*str1 | wc -l | grep 1
; RUN: grep mov.*str1 | count 1
target endian = little
target pointersize = 32

View File

@ -1,13 +1,13 @@
; RUN: llvm-as < %s | llc -march=x86 -o %t -f
; RUN: grep jb %t | wc -l | grep 1
; RUN: grep \\\$6 %t | wc -l | grep 2
; RUN: grep 1024 %t | wc -l | grep 1
; RUN: grep 1023 %t | wc -l | grep 1
; RUN: grep 119 %t | wc -l | grep 1
; RUN: grep JTI %t | wc -l | grep 2
; RUN: grep jg %t | wc -l | grep 1
; RUN: grep ja %t | wc -l | grep 1
; RUN: grep js %t | wc -l | grep 1
; RUN: grep jb %t | count 1
; RUN: grep \\\$6 %t | count 2
; RUN: grep 1024 %t | count 1
; RUN: grep 1023 %t | count 1
; RUN: grep 119 %t | count 1
; RUN: grep JTI %t | count 2
; RUN: grep jg %t | count 1
; RUN: grep ja %t | count 1
; RUN: grep js %t | count 1
target triple = "i686-pc-linux-gnu"

View File

@ -1,8 +1,8 @@
; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$7 | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$6 | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1024 | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep jb | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=x86 -o - | grep je | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$7 | count 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep \$6 | count 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep 1024 | count 1
; RUN: llvm-as < %s | llc -march=x86 -o - | grep jb | count 2
; RUN: llvm-as < %s | llc -march=x86 -o - | grep je | count 1
define i32 @main(i32 %tmp158) {
entry:

View File

@ -1,7 +1,7 @@
; This function should have exactly one call to fixdfdi, no more!
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | \
; RUN: grep {bl .*fixdfdi} | wc -l | grep 1
; RUN: grep {bl .*fixdfdi} | count 1
double %test2(double %tmp.7705) {
%mem_tmp.2.0.in = cast double %tmp.7705 to long ; <long> [#uses=1]

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=powerpc64-apple-darwin | grep extsw | count 2
%lens = external global ubyte*
%vals = external global int*

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | llc | grep mflr | wc -l | grep 1
; RUN: llvm-as < %s | llc | grep mflr | count 1
target datalayout = "e-p:32:32"
target triple = "powerpc-apple-darwin8"

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -march=ppc32 | grep bl.*baz | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep bl.*quux | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 -enable-tail-merge | grep bl.*baz | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=ppc32 -enable-tail-merge=1 | grep bl.*quux | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=ppc32 | grep bl.*baz | count 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep bl.*quux | count 2
; RUN: llvm-as < %s | llc -march=ppc32 -enable-tail-merge | grep bl.*baz | count 1
; RUN: llvm-as < %s | llc -march=ppc32 -enable-tail-merge=1 | grep bl.*quux | count 1
; Check that tail merging is not the default on ppc, and that -enable-tail-merge works.
; ModuleID = 'tail.c'

View File

@ -1,10 +1,10 @@
; All of these should be codegen'd without loading immediates
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
; RUN: grep addc %t | wc -l | grep 1
; RUN: grep adde %t | wc -l | grep 1
; RUN: grep addze %t | wc -l | grep 1
; RUN: grep addme %t | wc -l | grep 1
; RUN: grep addic %t | wc -l | grep 2
; RUN: grep addc %t | count 1
; RUN: grep adde %t | count 1
; RUN: grep addze %t | count 1
; RUN: grep addme %t | count 1
; RUN: grep addic %t | count 2
implementation ; Functions:

View File

@ -1,9 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep align.4 | wc -l | grep 1
; RUN: grep align.4 | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep align.2 | wc -l | grep 1
; RUN: grep align.2 | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep align.3 | wc -l | grep 1
; RUN: grep align.3 | count 1
%A = global <4 x uint> < uint 10, uint 20, uint 30, uint 40 >

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {b LBB.*} | wc -l | grep 4
; RUN: grep {b LBB.*} | count 4
target endian = big
target pointersize = 32

View File

@ -1,9 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | wc -l | grep 4
; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | count 4
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwimi
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | \
; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | wc -l | grep 4
; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | count 4
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwinm
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwimi

View File

@ -1,12 +1,12 @@
; There should be exactly one vxor here.
; RUN: llvm-upgrade < %s | llvm-as | \
; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
; RUN: grep vxor | wc -l | grep 1
; RUN: grep vxor | count 1
; There should be exactly one vsplti here.
; RUN: llvm-upgrade < %s | llvm-as | \
; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
; RUN: grep vsplti | wc -l | grep 1
; RUN: grep vsplti | count 1
void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) {

View File

@ -1,11 +1,11 @@
; Test various forms of calls.
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {bl } | wc -l | grep 2
; RUN: grep {bl } | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {bctrl} | wc -l | grep 1
; RUN: grep {bctrl} | count 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {bla } | wc -l | grep 1
; RUN: grep {bla } | count 1
declare void %foo()

View File

@ -1,10 +1,10 @@
; All of these routines should be perform optimal load of constants.
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep lis | wc -l | grep 5
; RUN: grep lis | count 5
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep ori | wc -l | grep 3
; RUN: grep ori | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep {li } | wc -l | grep 4
; RUN: grep {li } | count 4
implementation ; Functions:

View File

@ -1,13 +1,13 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep eqv | wc -l | grep 3
; RUN: grep eqv | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \
; RUN: grep andc | wc -l | grep 3
; RUN: grep andc | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep orc | wc -l | grep 2
; RUN: grep orc | count 2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | \
; RUN: grep nor | wc -l | grep 3
; RUN: grep nor | count 3
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: grep nand | wc -l | grep 1
; RUN: grep nand | count 1
int %EQV1(int %X, int %Y) {
%A = xor int %X, %Y

View File

@ -1,5 +1,5 @@
; This should turn into a single extsh
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep extsh | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep extsh | count 1
int %test(int %X) {
%tmp.81 = shl int %X, ubyte 16 ; <int> [#uses=1]
%tmp.82 = shr int %tmp.81, ubyte 16 ; <int> [#uses=1]

View File

@ -1,5 +1,5 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
; RUN: egrep {fn?madd|fn?msub} | wc -l | grep 8
; RUN: egrep {fn?madd|fn?msub} | count 8
double %test_FMADD1(double %A, double %B, double %C) {
%D = mul double %A, %B

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fcmp | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fcmp | count 1
declare bool %llvm.isunordered.f64(double, double)

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fctiwz | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fctiwz | count 1
implementation

View File

@ -3,7 +3,7 @@
; RUN: not grep mulhwu %t
; RUN: not grep srawi %t
; RUN: not grep add %t
; RUN: grep mulhw %t | wc -l | grep 1
; RUN: grep mulhw %t | count 1
implementation ; Functions:

View File

@ -1,6 +1,6 @@
; All of these ands and shifts should be folded into rlwimi's
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep and
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | wc -l | grep 8
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi | count 8
implementation ; Functions:

View File

@ -1,7 +1,7 @@
; All of these ands and shifts should be folded into rlwimi's
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
; RUN: grep rlwimi %t | wc -l | grep 3
; RUN: grep srwi %t | wc -l | grep 1
; RUN: grep rlwimi %t | count 3
; RUN: grep srwi %t | count 1
; RUN: not grep slwi %t
implementation ; Functions:

View File

@ -4,7 +4,7 @@
; RUN: not grep srawi %t
; RUN: not grep srwi %t
; RUN: not grep slwi %t
; RUN: grep rlwinm %t | wc -l | grep 8
; RUN: grep rlwinm %t | count 8
implementation ; Functions:

View File

@ -4,8 +4,8 @@
; RUN: not grep srawi %t
; RUN: not grep srwi %t
; RUN: not grep slwi %t
; RUN: grep rlwnm %t | wc -l | grep 1
; RUN: grep rlwinm %t | wc -l | grep 1
; RUN: grep rlwnm %t | count 1
; RUN: grep rlwinm %t | count 1
define i32 @test1(i32 %X, i32 %Y) {
entry:

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 4
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | count 4
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | count 2
; RUN: llvm-as < %s | llc -march=ppc32 | not grep or
define i32 @rotl32(i32 %A, i8 %Amt) {

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwnm | count 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwinm | count 2
define i32 @rotlw(i32 %x, i32 %sh) {
entry:

View File

@ -1,10 +1,10 @@
; All of these should be codegen'd without loading immediates
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
; RUN: grep subfc %t | wc -l | grep 1
; RUN: grep subfe %t | wc -l | grep 1
; RUN: grep subfze %t | wc -l | grep 1
; RUN: grep subfme %t | wc -l | grep 1
; RUN: grep subfic %t | wc -l | grep 2
; RUN: grep subfc %t | count 1
; RUN: grep subfe %t | count 1
; RUN: grep subfze %t | count 1
; RUN: grep subfme %t | count 1
; RUN: grep subfic %t | count 2
implementation ; Functions:
long %sub_ll(long %a, long %b) {

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=ppc32 | grep fmul | wc -l | grep 2
; RUN: llvm-as < %s | llc -march=ppc32 | grep fmul | count 2
; RUN: llvm-as < %s | llc -march=ppc32 -enable-unsafe-fp-math | \
; RUN: grep fmul | wc -l | grep 1
; RUN: grep fmul | count 1
define double @foo(double %X) {
%tmp1 = mul double %X, 1.23

View File

@ -1,6 +1,6 @@
; This should fold the "vcmpbfp." and "vcmpbfp" instructions into a single
; "vcmpbfp.".
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vcmpbfp | wc -l | grep 1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vcmpbfp | count 1
void %test(<4 x float>* %x, <4 x float>* %y, int* %P) {
entry:

View File

@ -1,11 +1,11 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | \
; RUN: llc -march=ppc32 -mcpu=g5 | not grep vperm
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 > %t
; RUN: grep vsldoi %t | wc -l | grep 2
; RUN: grep vmrgh %t | wc -l | grep 7
; RUN: grep vmrgl %t | wc -l | grep 6
; RUN: grep vpkuhum %t | wc -l | grep 1
; RUN: grep vpkuwum %t | wc -l | grep 1
; RUN: grep vsldoi %t | count 2
; RUN: grep vmrgh %t | count 7
; RUN: grep vmrgl %t | count 6
; RUN: grep vpkuhum %t | count 1
; RUN: grep vpkuwum %t | count 1
void %VSLDOI_xy(<8 x short>* %A, <8 x short>* %B) {
entry:

View File

@ -1,10 +1,10 @@
; Test that vectors are scalarized/lowered correctly.
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 | \
; RUN: grep stfs | wc -l | grep 4
; RUN: grep stfs | count 4
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 -o %t -f
; RUN: grep vspltw %t | wc -l | grep 2
; RUN: grep vsplti %t | wc -l | grep 3
; RUN: grep vsplth %t | wc -l | grep 1
; RUN: grep vspltw %t | count 2
; RUN: grep vsplti %t | count 3
; RUN: grep vsplth %t | count 1
%f4 = type <4 x float>
%i4 = type <4 x int>

Some files were not shown because too many files have changed in this diff Show More