Alter these tests to ensure they match a "test $1, X" X86 instruction that
authorReid Spencer <rspencer@reidspencer.com>
Mon, 27 Nov 2006 05:08:03 +0000 (05:08 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 27 Nov 2006 05:08:03 +0000 (05:08 +0000)
is now generated by the LLVM backend for "trunc to bool" instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31935 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/cast-to-bool.c
test/CodeGen/X86/trunc-to-bool.ll

index ddf21b085423b19644439a576dcc450ec90a1e19..e0f48daa731dd2354bd478b93d8a3ebc1e8cebdc 100644 (file)
@@ -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)
 {
index 693b94c7737b507219fa4e7b0537cdefd237ff82..0af8de2729d314b93f63e56fa3d840c28d94a283 100644 (file)
@@ -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