From 011b3a5c18de5124a79af5754e0ab901eb220db8 Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Tue, 1 May 2018 16:37:27 +0000 Subject: [PATCH] Fix the sed command in test which doesn't work well on BSD. llvm-svn: 331280 --- llvm/test/Other/pr32085.ll | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/llvm/test/Other/pr32085.ll b/llvm/test/Other/pr32085.ll index d850bf2761ea..52281cad19b0 100644 --- a/llvm/test/Other/pr32085.ll +++ b/llvm/test/Other/pr32085.ll @@ -1,8 +1,11 @@ ; RUN: opt -S -O1 < %s -o %t1.ll ;; Show that there's no difference after running another simplify CFG -; RUN: opt -S -simplifycfg < %t1.ll -o %t2.ll -; RUN: sed -i 's/; preds = .*//g' %t1.ll %t2.ll -; RUN: diff %t1.ll %t2.ll +; RUN: opt -S -simplifycfg < %t1.ll -o %t2.ll +;; Strip the BB predecessors comments because it may have different +;; output order. +; RUN: sed 's/; preds = .*//g' %t1.ll > %t1.strip.ll +; RUN: sed 's/; preds = .*//g' %t2.ll > %t2.strip.ll +; RUN: diff %t1.strip.ll %t2.strip.ll ; Test from LoopSink pass, leaves some single-entry single-exit basic blocks. ; After LoopSink, we get a basic block .exit.loopexit which has one entry and -- 2.34.1