Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
libcxxabi
libunwind
lld
lldb
llvm
bindings
cmake
docs
examples
include
lib
projects
resources
runtimes
scripts
test
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen
DebugInfo
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LTO
Linker
MC
Object
ObjectYAML
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO
Transforms
ADCE
AddDiscriminators
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
BDCE
BranchFolding
CallSiteSplitting
CalledValuePropagation
CodeExtractor
CodeGenPrepare
ConstProp
ConstantHoisting
ConstantMerge
Coroutines
CorrelatedValuePropagation
CrossDSOCFI
DCE
DeadArgElim
DeadStoreElimination
DivRemPairs
EarlyCSE
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport
GCOVProfiling
GVN
GVNHoist
GVNSink
GlobalDCE
GlobalMerge
GlobalOpt
GlobalSplit
GuardWidening
IPConstantProp
IRCE
IndVarSimplify
IndirectBrExpand
InferAddressSpaces
InferFunctionAttrs
Inline
InstCombine
InstMerge
InstNamer
InstSimplify
InterleavedAccess
Internalize
JumpThreading
LCSSA
LICM
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopIdiom
LoopInterchange
LoopLoadElim
LoopPredication
LoopReroll
LoopRotate
LoopSimplify
LoopSimplifyCFG
LoopStrengthReduce
LoopUnroll
LoopUnswitch
LoopVectorize
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests
Mem2Reg
MemCpyOpt
MergeFunc
MergeICmps
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN
ObjCARC
PGOProfile
PartiallyInlineLibCalls
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate
Reg2Mem
RewriteStatepointsForGC
SCCP
SLPVectorizer
SROA
SafeStack
SampleProfile
Scalarizer
SeparateConstOffsetFromGEP
SimpleLoopUnswitch
2006-06-13-SingleEntryPHI.ll
2006-06-27-DeadSwitchCase.ll
2007-05-09-Unreachable.ll
2007-05-09-tl.ll
2007-07-12-ExitDomInfo.ll
2007-07-13-DomInfo.ll
2007-07-18-DomInfo.ll
2007-08-01-Dom.ll
2007-08-01-LCSSA.ll
2007-10-04-DomFrontier.ll
2008-06-02-DomInfo.ll
2008-06-17-DomFrontier.ll
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll
2012-05-20-Phi.ll
2015-09-18-Addrspace.ll
LIV-loop-condtion.ll
basictest.ll
cleanuppad.ll
copy-metadata.ll
crash.ll
exponential-behavior.ll
infinite-loop.ll
msan.ll
nontrivial-unswitch-cost.ll
nontrivial-unswitch.ll
preserve-analyses.ll
trivial-unswitch.ll
SimplifyCFG
Sink
SpeculateAroundPHIs
SpeculativeExecution
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG
TailCallElim
ThinLTOBitcodeWriter
Util
WholeProgramDevirt
Unit
Verifier
YAMLParser
tools
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in
tools
unittests
utils
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in
version.txt.in
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm-project/llvm/test/Transforms/SimpleLoopUnswitch/exponential-behavior.ll

52 lines
1.4 KiB
LLVM
Raw Normal View History

; RUN: opt -simple-loop-unswitch -S < %s | FileCheck %s
define void @f(i32 %n, i32* %ptr) {
; CHECK-LABEL: @f(
entry:
br label %loop
loop:
%iv = phi i32 [ 0, %entry ], [ %iv.inc, %be ]
%iv.inc = add i32 %iv, 1
%unswitch_cond_root = icmp ne i32 %iv.inc, 42
%us.0 = and i1 %unswitch_cond_root, %unswitch_cond_root
%us.1 = and i1 %us.0, %us.0
%us.2 = and i1 %us.1, %us.1
%us.3 = and i1 %us.2, %us.2
%us.4 = and i1 %us.3, %us.3
%us.5 = and i1 %us.4, %us.4
%us.6 = and i1 %us.5, %us.5
%us.7 = and i1 %us.6, %us.6
%us.8 = and i1 %us.7, %us.7
%us.9 = and i1 %us.8, %us.8
%us.10 = and i1 %us.9, %us.9
%us.11 = and i1 %us.10, %us.10
%us.12 = and i1 %us.11, %us.11
%us.13 = and i1 %us.12, %us.12
%us.14 = and i1 %us.13, %us.13
%us.15 = and i1 %us.14, %us.14
%us.16 = and i1 %us.15, %us.15
%us.17 = and i1 %us.16, %us.16
%us.18 = and i1 %us.17, %us.17
%us.19 = and i1 %us.18, %us.18
%us.20 = and i1 %us.19, %us.19
%us.21 = and i1 %us.20, %us.20
%us.22 = and i1 %us.21, %us.21
%us.23 = and i1 %us.22, %us.22
%us.24 = and i1 %us.23, %us.23
%us.25 = and i1 %us.24, %us.24
%us.26 = and i1 %us.25, %us.25
%us.27 = and i1 %us.26, %us.26
%us.28 = and i1 %us.27, %us.27
%us.29 = and i1 %us.28, %us.28
br i1 %us.29, label %leave, label %be
be:
store volatile i32 0, i32* %ptr
%becond = icmp ult i32 %iv.inc, %n
br i1 %becond, label %leave, label %loop
leave:
ret void
}