[llvm] r331280 - Fix the sed command in test which doesn't work well on BSD.

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Tue May 1 09:37:27 PDT 2018


Author: wmi
Date: Tue May  1 09:37:27 2018
New Revision: 331280

URL: http://llvm.org/viewvc/llvm-project?rev=331280&view=rev
Log:
Fix the sed command in test which doesn't work well on BSD.

Modified:
    llvm/trunk/test/Other/pr32085.ll

Modified: llvm/trunk/test/Other/pr32085.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/pr32085.ll?rev=331280&r1=331279&r2=331280&view=diff
==============================================================================
--- llvm/trunk/test/Other/pr32085.ll (original)
+++ llvm/trunk/test/Other/pr32085.ll Tue May  1 09:37:27 2018
@@ -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




More information about the llvm-commits mailing list