#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
usingnamespacellvm;
static void
runWithLoopInfo(Module &M, StringRef FuncName,
function_ref<void(Function &F, LoopInfo &LI)> Test) { … }
static void runWithLoopInfoPlus(
Module &M, StringRef FuncName,
function_ref<void(Function &F, LoopInfo &LI, ScalarEvolution &SE)> Test) { … }
static std::unique_ptr<Module> makeLLVMModule(LLVMContext &Context,
const char *ModuleStr) { … }
TEST(LoopInfoTest, LoopWithSingleLatch) { … }
TEST(LoopInfoTest, LoopWithMultipleLatches) { … }
TEST(LoopInfoTest, PreorderTraversals) { … }
TEST(LoopInfoTest, CanonicalLoop) { … }
TEST(LoopInfoTest, LoopWithInverseGuardSuccs) { … }
TEST(LoopInfoTest, LoopWithSwappedGuardCmp) { … }
TEST(LoopInfoTest, LoopWithInverseLatchSuccs) { … }
TEST(LoopInfoTest, LoopWithLatchCmpNE) { … }
TEST(LoopInfoTest, LoopWithGuardCmpSLE) { … }
TEST(LoopInfoTest, LoopNonConstantStep) { … }
TEST(LoopInfoTest, LoopUnsignedBounds) { … }
TEST(LoopInfoTest, DecreasingLoop) { … }
TEST(LoopInfoTest, CannotFindDirection) { … }
TEST(LoopInfoTest, ZextIndVar) { … }
TEST(LoopInfoTest, MultiExitingLoop) { … }
TEST(LoopInfoTest, MultiExitLoop) { … }
TEST(LoopInfoTest, UnguardedLoop) { … }
TEST(LoopInfoTest, UnguardedLoopWithControlFlow) { … }
TEST(LoopInfoTest, LoopNest) { … }
TEST(LoopInfoTest, AuxiliaryIV) { … }
TEST(LoopInfoTest, LoopNotInSimplifyForm) { … }
TEST(LoopInfoTest, LoopLatchNotExiting) { … }
TEST(LoopInfoTest, LoopUniqueExitBlocks) { … }
TEST(LoopInfoTest, LoopNonLatchUniqueExitBlocks) { … }
TEST(LoopInfoTest, LoopNotRotated) { … }
TEST(LoopInfoTest, LoopUserBranch) { … }
TEST(LoopInfoTest, LoopInductionVariable) { … }
TEST(LoopInfoTest, TokenLCSSA) { … }