File: invariant-load-preload-base-pointer-origin-first.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,418,840 kB
  • sloc: cpp: 5,290,826; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,898; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,913; xml: 953; cs: 573; fortran: 539
file content (91 lines) | stat: -rw-r--r-- 3,798 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
; RUN: opt %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true < %s
;
; Check that we generate valid code as we did non preload the base pointer
; origin of %tmp4 at some point.
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

@TOP = external global i64*, align 8
@BOT = external global i64*, align 8

define void @RemoveConstraintVCG() {
entry:
  br i1 undef, label %for.end.161, label %for.cond.2.preheader

for.cond.2.preheader:                             ; preds = %entry
  br i1 undef, label %for.end.128, label %for.body.4

for.body.4:                                       ; preds = %for.inc.126, %for.cond.2.preheader
  br i1 undef, label %for.cond.8.preheader, label %for.inc.126

for.cond.8.preheader:                             ; preds = %for.body.4
  br i1 undef, label %for.inc.126, label %for.body.11

for.body.11:                                      ; preds = %for.inc, %for.cond.8.preheader
  br i1 undef, label %land.lhs.true, label %for.inc

land.lhs.true:                                    ; preds = %for.body.11
  br i1 undef, label %if.then.20, label %for.inc

if.then.20:                                       ; preds = %land.lhs.true
  %tmp = load i64*, i64** @TOP, align 8
  %tmp1 = load i64, i64* %tmp, align 8
  %cmp25 = icmp eq i64 %tmp1, 1
  %cmp47 = icmp eq i64 %tmp1, 0
  br i1 false, label %if.end.117, label %lor.lhs.false.85

lor.lhs.false.85:                                 ; preds = %if.then.20
  %add94 = add i64 %tmp1, 1
  %tmp2 = load i64*, i64** @TOP, align 8
  %arrayidx95 = getelementptr inbounds i64, i64* %tmp2, i64 %add94
  %tmp3 = load i64, i64* %arrayidx95, align 8
  br i1 false, label %if.else.103, label %land.lhs.true.97

land.lhs.true.97:                                 ; preds = %lor.lhs.false.85
  %tmp4 = load i64*, i64** @BOT, align 8
  %arrayidx99 = getelementptr inbounds i64, i64* %tmp4, i64 %add94
  %tmp5 = load i64, i64* %arrayidx99, align 8
  %tobool100 = icmp eq i64 %tmp5, 0
  br i1 %tobool100, label %if.else.103, label %if.then.101

if.then.101:                                      ; preds = %land.lhs.true.97
  br label %if.end.117

if.else.103:                                      ; preds = %land.lhs.true.97, %lor.lhs.false.85
  %tmp6 = load i64*, i64** @TOP, align 8
  %arrayidx105 = getelementptr inbounds i64, i64* %tmp6, i64 %add94
  %tmp7 = load i64, i64* %arrayidx105, align 8
  br i1 false, label %lor.lhs.false.107, label %if.else.112

lor.lhs.false.107:                                ; preds = %if.else.103
  %tmp8 = load i64*, i64** @BOT, align 8
  %arrayidx109 = getelementptr inbounds i64, i64* %tmp8, i64 %add94
  br i1 false, label %if.end.117, label %if.else.112

if.else.112:                                      ; preds = %lor.lhs.false.107, %if.else.103
  br label %if.end.117

if.end.117:                                       ; preds = %if.else.112, %lor.lhs.false.107, %if.then.101, %if.then.20
  br i1 undef, label %if.then.119, label %for.inc

if.then.119:                                      ; preds = %if.end.117
  br label %for.inc

for.inc:                                          ; preds = %if.then.119, %if.end.117, %land.lhs.true, %for.body.11
  br i1 false, label %for.body.11, label %for.inc.126

for.inc.126:                                      ; preds = %for.inc, %for.cond.8.preheader, %for.body.4
  br i1 undef, label %for.end.128, label %for.body.4

for.end.128:                                      ; preds = %for.inc.126, %for.cond.2.preheader
  br i1 false, label %cond.false, label %cond.end

cond.false:                                       ; preds = %for.end.128
  unreachable

cond.end:                                         ; preds = %for.end.128
  unreachable

for.end.161:                                      ; preds = %entry
  ret void
}