From 2c390c54f64c6303aa4f7151cda5c466ae3ccc23 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 29 Aug 2018 12:21:32 +0000 Subject: Revert r340921 "[NFC] Unify guards detection" This broke the build, see e.g. http://lab.llvm.org:8011/builders/clang-cmake-armv8-lnt/builds/4626/ http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/18647/ http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/5856/ http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/22800/ > We have multiple places in code where we try to identify whether or not > some instruction is a guard. This patch factors out this logic into a separate > utility function which works uniformly in all places. > > Differential Revision: https://reviews.llvm.org/D51152 > Reviewed By: fedor.sergeev llvm-svn: 340923 --- llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/EarlyCSE.cpp') diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index d24ad0327f1..533d16e088c 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp @@ -54,7 +54,6 @@ #include "llvm/Support/RecyclingAllocator.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Scalar.h" -#include "llvm/Transforms/Utils/GuardUtils.h" #include #include #include @@ -864,7 +863,7 @@ bool EarlyCSE::processNode(DomTreeNode *Node) { continue; } - if (isGuard(Inst)) { + if (match(Inst, m_Intrinsic())) { if (auto *CondI = dyn_cast(cast(Inst)->getArgOperand(0))) { if (SimpleValue::canHandle(CondI)) { -- cgit v1.2.3