You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm
bindings
cmake
docs
examples
include
lib
projects
resources
runtimes
scripts
test
Analysis
AliasSet
AssumptionCache
BasicAA
BlockFrequencyInfo
BranchProbabilityInfo
CFLAliasAnalysis
CallGraph
ConstantFolding
CostModel
Delinearization
DemandedBits
DependenceAnalysis
DivergenceAnalysis
DominanceFrontier
Dominators
GlobalsModRef
IVUsers
LazyCallGraph
LazyValueAnalysis
Lint
LoopAccessAnalysis
backward-dep-different-types.ll
forward-loop-carried.ll
forward-loop-independent.ll
independent-interleaved.ll
interleave-innermost.ll
memcheck-for-loop-invariant.ll
memcheck-off-by-one-error.ll
memcheck-wrapping-pointers.ll
multiple-strides-rt-memory-checks.ll
non-wrapping-pointer.ll
nullptr.ll
number-of-memchecks.ll
pointer-with-unknown-bounds.ll
pr31098.ll
resort-to-memchecks-only.ll
reverse-memcheck-bounds.ll
safe-no-checks.ll
safe-with-dep-distance.ll
store-to-invariant-check1.ll
store-to-invariant-check2.ll
store-to-invariant-check3.ll
stride-access-dependence.ll
underlying-objects-1.ll
underlying-objects-2.ll
unsafe-and-rt-checks.ll
wrapping-pointer-versioning.ll
LoopInfo
MemoryDependenceAnalysis
MemorySSA
PostDominators
ProfileSummary
RegionInfo
ScalarEvolution
ScopedNoAliasAA
TypeBasedAliasAnalysis
ValueTracking
alias-analysis-uses.ll
Assembler
Bindings
Bitcode
BugPoint
CodeGen
DebugInfo
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LTO
Linker
MC
Object
ObjectYAML
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO
Transforms
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
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
libgc
llvm
m4
man
mcs
mk
mono
msvc
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
69 lines
2.0 KiB
LLVM
69 lines
2.0 KiB
LLVM
![]() |
; RUN: opt -loop-accesses -analyze -S < %s | FileCheck %s
|
||
|
; RUN: opt -passes='require<scalar-evolution>,require<aa>,loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
|
||
|
|
||
|
; This is the test case from PR26314.
|
||
|
; When we were retrying dependence checking with memchecks only,
|
||
|
; the loop-invariant access in the inner loop was incorrectly determined to be wrapping
|
||
|
; because it was not strided in the inner loop.
|
||
|
|
||
|
; #define Z 32
|
||
|
; typedef struct s {
|
||
|
; int v1[Z];
|
||
|
; int v2[Z];
|
||
|
; int v3[Z][Z];
|
||
|
; } s;
|
||
|
;
|
||
|
; void slow_function (s* const obj, int z) {
|
||
|
; for (int j=0; j<Z; j++) {
|
||
|
; for (int k=0; k<z; k++) {
|
||
|
; int x = obj->v1[k] + obj->v2[j];
|
||
|
; obj->v3[j][k] += x;
|
||
|
; }
|
||
|
; }
|
||
|
; }
|
||
|
|
||
|
; CHECK: function 'Test':
|
||
|
; CHECK: .inner:
|
||
|
; CHECK-NEXT: Memory dependences are safe
|
||
|
; CHECK-NEXT: Dependences:
|
||
|
; CHECK-NEXT: Run-time memory checks:
|
||
|
; CHECK: Check 0:
|
||
|
; CHECK: Check 1:
|
||
|
|
||
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||
|
target triple = "x86_64-unknown-linux-gnu"
|
||
|
|
||
|
%struct.s = type { [32 x i32], [32 x i32], [32 x [32 x i32]] }
|
||
|
|
||
|
define void @Test(%struct.s* nocapture %obj, i64 %z) #0 {
|
||
|
br label %.outer.preheader
|
||
|
|
||
|
|
||
|
.outer.preheader:
|
||
|
%i = phi i64 [ 0, %0 ], [ %i.next, %.outer ]
|
||
|
%1 = getelementptr inbounds %struct.s, %struct.s* %obj, i64 0, i32 1, i64 %i
|
||
|
br label %.inner
|
||
|
|
||
|
.exit:
|
||
|
ret void
|
||
|
|
||
|
.outer:
|
||
|
%i.next = add nuw nsw i64 %i, 1
|
||
|
%exitcond.outer = icmp eq i64 %i.next, 32
|
||
|
br i1 %exitcond.outer, label %.exit, label %.outer.preheader
|
||
|
|
||
|
.inner:
|
||
|
%j = phi i64 [ 0, %.outer.preheader ], [ %j.next, %.inner ]
|
||
|
%2 = getelementptr inbounds %struct.s, %struct.s* %obj, i64 0, i32 0, i64 %j
|
||
|
%3 = load i32, i32* %2
|
||
|
%4 = load i32, i32* %1
|
||
|
%5 = add nsw i32 %4, %3
|
||
|
%6 = getelementptr inbounds %struct.s, %struct.s* %obj, i64 0, i32 2, i64 %i, i64 %j
|
||
|
%7 = load i32, i32* %6
|
||
|
%8 = add nsw i32 %5, %7
|
||
|
store i32 %8, i32* %6
|
||
|
%j.next = add nuw nsw i64 %j, 1
|
||
|
%exitcond.inner = icmp eq i64 %j.next, %z
|
||
|
br i1 %exitcond.inner, label %.outer, label %.inner
|
||
|
}
|