-/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep cast
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep cast
*/
void test(int* array, long long N) {
-/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep __builtin_
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
*
* __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp
* just like explicit setjmp/longjmp calls are.
-// 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 | wc -l | grep 4
void *test1() {
return __builtin_return_address(1);
-// RUN: %llvmgcc %s -S -o - | not grep 'foo\* sub'
+// RUN: %llvmgcc %s -S -o - | not grep {foo\\* sub}
// This should not produce a subtrace constantexpr of a pointer
struct foo {
int Y;
-// RUN: %llvmgcc -S 2004-11-27-StaticFunctionRedeclare.c -o - | gccas | llvm-dis | not grep 'declare int.*func'
+// RUN: %llvmgcc -c -emit-llvm 2004-11-27-StaticFunctionRedeclare.c -o - | \
+// RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func}
// There should not be an unresolved reference to func here. Believe it or not,
// the "expected result" is a function named 'func' which is internal and
-// RUN: %llvmgcc -xc %s -S -o - | grep 'internal constant '
+// RUN: %llvmgcc -xc %s -S -o - | grep {internal constant }
// The synthetic global made by the CFE for big initializer should be marked
// constant.
-// RUN: %llvmgcc %s -S -o - && \
// RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts &&
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc &&
-// RUN: %llvmgcc %s -S -o - | llvm-as | llc -std-compile-opts | llc | \
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc | \
// RUN: not grep _foo2
void foo() __asm__("foo2");
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
+// RUN: grep llvm.used | grep foo | grep X
int X __attribute__((used));
int Y;
-// RUN: %llvmgcc %s -S -g -o - | grep 'llvm.dbg.stoppoint.*i32 14'
+// RUN: %llvmgcc %s -S -g -o - | grep {llvm.dbg.stoppoint.*i32 14}
// PR664: ensure that line #'s are emitted for declarations
-// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(i32'
-// RUNMEIFWEHADSIGNEDTYPES: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(i32'
+// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | wc -l | grep 2
unsigned t2(unsigned X) {
return __builtin_clz(X);
// 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\]} | wc -l | grep 5
__asm__ ("foo1");
__asm__ ("foo2");
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN: llvm-dis | grep '@nate.*internal global i32 0'
+// RUN: llvm-dis | grep {@nate.*internal global i32 0}
struct X { int *XX; int Y;};
-// RUN: %llvmgcc %s -S -o /dev/null &&
-// RUN: %llvmgcc %s -S -o - | grep 'ext: xorl %eax, eax; movl' &&
-// RUN: %llvmgcc %s -S -o - | grep 'nonext: xorl %eax, %eax; mov'
+// RUN: %llvmgcc %s -S -o - | grep {ext: xorl %eax, eax; movl}
+// RUN: %llvmgcc %s -S -o - | grep {nonext: xorl %eax, %eax; mov}
// PR924
void bar() {
-// RUN: %llvmgcc -O3 -S %s -o - | grep 'fcmp ord float %X, %Y'
+// RUN: %llvmgcc -O3 -S %s -o - | grep {fcmp ord float %X, %Y}
int test2(float X, float Y) {
return !__builtin_isunordered(X, Y);
-// Verify that the %c modifier works and strips off any prefixes from immediates.
-// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep 'pickANumber: 789514'
+// Verify that the %c modifier works and strips off any prefixes from
+// immediates.
+// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep {pickANumber: 789514}
void foo() {
__asm__ volatile("/* " "pickANumber" ": %c0 */"::"i"(0xC0C0A));
// Test the -fwritable-strings option.
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | grep 'internal global' &&
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep 'internal constant'
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
+// RUN: grep {internal global}
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {internal constant}
char *X = "foo";
-// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | grep 'call float @foo'
+// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | \
+// RUN: grep {call float @foo}
// Make sure the call to foo is compiled as:
// call float @foo()
// Testcase for PR1242
// RUN: %llvmgcc -S %s -o - | grep datalayout | \
-// RUN: not grep '"[Ee]-p:[36][24]:[36][24]"'
+// RUN: not grep {"\[Ee\]-p:\[36\]\[24\]:\[36\]\[24\]"}
+// END.
#include <stdlib.h>
#define NDIM 3
#define BODY 01
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
struct V { short X, Y; };
int bar() {
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
union U { int x; char* p; };
void foo() {
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
+// RUN: grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
+// RUN: grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 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: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xstatnoWeak | grep internal | wc -l | grep 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
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobWeak | grep extern_weak | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN: grep xglobWeak | grep extern_weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xextWeak | grep weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 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: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xstatnoWeak | grep internal | wc -l | grep 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
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
struct V { short X, Y; };
int bar() {
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
union U { int x; char* p; };
void foo() {
-// RUN: %llvmgcc -S %s -o - /dev/null 2>&1 > /dev/null | \
-// RUN: not grep warning
+// RUN: ignore %llvmgcc -S %s -o - /dev/null |& not grep warning
// XFAIL: *
#define ATTR_BITS(N) __attribute__((bitwidth(N)))
-// RUN: %llvmgcc -S %s -o - | grep 'trunc.*to bool'
-// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | grep 'test.*1'
+// RUN: %llvmgcc -S %s -o - | grep {trunc.*to i8}
+// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | \
+// RUN: grep {test.*1}
int
main ( int argc, char** argv)
{
-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}]]
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak &&
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm | llvm-as | llc
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
void foo() __attribute__((weak_import));
-// RUN: %llvmgcc %s -emit-llvm -S -o - | grep 'hidden global'
+// RUN: %llvmgcc %s -emit-llvm -S -o - | grep {hidden global}
int X __attribute__ ((__visibility__ ("hidden"))) = 123;
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep 'sret' | wc -l | grep '5'
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | wc -l | grep 5
struct abc {
int a;
void bar() {
struct abc dummy1 = foo1();
struct abc dummy2 = foo2();
-}
\ No newline at end of file
+}