[test][NFC] Guard one test case against LLVM checkouts at interesting paths
authorWANG Xuerui <git@xen0n.name>
Sun, 11 Dec 2022 13:31:11 +0000 (16:31 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 11 Dec 2022 13:31:11 +0000 (16:31 +0300)
Previously only the "store" string was being checked for not appearing
twice, but unfortunately the check also looked at the ModuleID and
source_filename lines, so the test case would fail if the LLVM
checkout's absolute path contained the substring "store".

Fix this spurious test failure by tweaking the invocation so the full
path no longer shows up in the output.

Differential Revision: https://reviews.llvm.org/D131540

llvm/test/Transforms/GVNHoist/non-trivial-phi.ll

index de885f0..3711175 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -passes=gvn-hoist %s -S -o - | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
 
 ; CHECK: store
 ; CHECK-NOT: store