[PATCH] Fix pr2570 test on OpenBSD

Brad Smith brad at comstyle.com
Tue Dec 17 02:08:45 PST 2013


The pr2570 test is failing on OpenBSD like so..

******************** TEST 'LLVM :: Transforms/LoopStrengthReduce/pr2570.ll' FAILED ********************
Script:
--
/buildbot-llvm/clang-openbsd/llvm/Release+Asserts/bin/opt < /buildbot-llvm/clang-openbsd/llvm/test/Transforms/LoopStrengthReduce/pr2570.ll -loop-reduce -S | grep "phi\>" | /buildbot-llvm/clang-openbsd/llvm/Release+Asserts/bin/count 8
--
Exit Code: 1

Command Output (stderr):
--
Expected 8 lines, got 0.


Because the use of grep is using a GNU grep extension. Attached is a patch to fix the use of
grep so it'll work with non-GNU implmentations.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
Index: test/Transforms/LoopStrengthReduce/pr2570.ll
===================================================================
--- test/Transforms/LoopStrengthReduce/pr2570.ll	(revision 197484)
+++ test/Transforms/LoopStrengthReduce/pr2570.ll	(working copy)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -loop-reduce -S | grep "phi\>" | count 8
+; RUN: opt < %s -loop-reduce -S | grep "phi[[:>:]]" | count 8
 ; PR2570
 
 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-f80:32:32"


More information about the llvm-commits mailing list