From 6781858c3432881a334bd965231a8c4dbbd31f03 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 27 Nov 2006 05:08:03 +0000 Subject: [PATCH] Alter these tests to ensure they match a "test $1, X" X86 instruction that is now generated by the LLVM backend for "trunc to bool" instructions. llvm-svn: 31935 --- test/Regression/CFrontend/cast-to-bool.c | 2 +- test/Regression/CodeGen/X86/trunc-to-bool.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Regression/CFrontend/cast-to-bool.c b/test/Regression/CFrontend/cast-to-bool.c index ddf21b08542..e0f48daa731 100644 --- a/test/Regression/CFrontend/cast-to-bool.c +++ b/test/Regression/CFrontend/cast-to-bool.c @@ -1,5 +1,5 @@ // RUN: %llvmgcc -S %s -o - | grep 'trunc.*to bool' -// RUN: %llvmgcc -S %s -o - | llvm-as | llc -march=x86 | grep and +// RUN: %llvmgcc -S %s -o - | llvm-as | llc -march=x86 | grep 'test.*1' int main ( int argc, char** argv) { diff --git a/test/Regression/CodeGen/X86/trunc-to-bool.ll b/test/Regression/CodeGen/X86/trunc-to-bool.ll index 693b94c7737..0af8de2729d 100644 --- a/test/Regression/CodeGen/X86/trunc-to-bool.ll +++ b/test/Regression/CodeGen/X86/trunc-to-bool.ll @@ -2,7 +2,7 @@ ; sure only the LSBit survives. Test that this is the case both for a returned ; value and as the operand of a branch. ; RUN: llvm-as < %s | llc -march=x86 && -; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*1\)' | wc -l | grep 3 +; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | wc -l | grep 3 bool %test1(int %X) { %Y = trunc int %X to bool ret bool %Y