File: phi_in_exit_early_lnt_failure_3.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (62 lines) | stat: -rw-r--r-- 3,245 bytes parent folder | download | duplicates (5)
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
; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; This caused an lnt crash at some point, just verify it will run through and
; produce the PHI node in the exit we are looking for.
;
; CHECK-LABEL: polly.merge_new_and_old:
; CHECK-NEXT:     %n2ptr.2.ph.merge = phi ptr [ %n2ptr.2.ph.final_reload, %polly.exiting ], [ %n2ptr.2.ph, %if.end.45.region_exiting ]
;
; CHECK-LABEL: if.end.45:
; CHECK-NEXT:     %n2ptr.2 = phi ptr [ %add.ptr25, %entry ], [ %add.ptr25, %while.cond.preheader ], [ %n2ptr.2.ph.merge, %polly.merge_new_and_old ]

%struct.bc_struct.0.2.4.6.8.15.24.27.29.32.38.46.48.92.93.94.95.97.99.100.102.105.107.111.118.119.121 = type { i32, i32, i32, i32, [1024 x i8] }

; Function Attrs: nounwind uwtable
declare ptr @new_num() #0

; Function Attrs: nounwind uwtable
define void @_do_add(ptr %n2) #0 {
entry:
  %call = tail call ptr @new_num()
  %0 = load i32, ptr undef, align 4
  %add.ptr22 = getelementptr inbounds %struct.bc_struct.0.2.4.6.8.15.24.27.29.32.38.46.48.92.93.94.95.97.99.100.102.105.107.111.118.119.121, ptr %n2, i64 0, i32 4, i64 0
  %add.ptr25 = getelementptr inbounds i8, ptr %add.ptr22, i64 -1
  %add.ptr29 = getelementptr inbounds %struct.bc_struct.0.2.4.6.8.15.24.27.29.32.38.46.48.92.93.94.95.97.99.100.102.105.107.111.118.119.121, ptr %call, i64 0, i32 4, i64 0
  %add.ptr32 = getelementptr inbounds i8, ptr %add.ptr29, i64 -1
  br i1 undef, label %if.end.45, label %if.then

if.then:                                          ; preds = %entry
  br i1 undef, label %while.cond.preheader, label %while.cond.38.preheader

while.cond.38.preheader:                          ; preds = %if.then
  %cmp39.39 = icmp sgt i32 %0, 0
  br i1 %cmp39.39, label %while.body.40.lr.ph, label %if.end.45

while.body.40.lr.ph:                              ; preds = %while.cond.38.preheader
  br label %while.body.40

while.cond.preheader:                             ; preds = %if.then
  br i1 undef, label %while.body.lr.ph, label %if.end.45

while.body.lr.ph:                                 ; preds = %while.cond.preheader
  br label %while.body

while.body:                                       ; preds = %while.body, %while.body.lr.ph
  br label %while.body

while.body.40:                                    ; preds = %while.body.40, %while.body.40.lr.ph
  %sumptr.141 = phi ptr [ %add.ptr32, %while.body.40.lr.ph ], [ %incdec.ptr42, %while.body.40 ]
  %n2ptr.040 = phi ptr [ %add.ptr25, %while.body.40.lr.ph ], [ %incdec.ptr41, %while.body.40 ]
  %incdec.ptr41 = getelementptr inbounds i8, ptr %n2ptr.040, i64 -1
  %1 = load i8, ptr %n2ptr.040, align 1
  %incdec.ptr42 = getelementptr inbounds i8, ptr %sumptr.141, i64 -1
  store i8 %1, ptr %sumptr.141, align 1
  br i1 false, label %while.body.40, label %while.cond.38.if.end.45.loopexit9_crit_edge

while.cond.38.if.end.45.loopexit9_crit_edge:      ; preds = %while.body.40
  br label %if.end.45

if.end.45:                                        ; preds = %while.cond.38.if.end.45.loopexit9_crit_edge, %while.cond.preheader, %while.cond.38.preheader, %entry
  %n2ptr.2 = phi ptr [ %add.ptr25, %entry ], [ %add.ptr25, %while.cond.preheader ], [ undef, %while.cond.38.if.end.45.loopexit9_crit_edge ], [ %add.ptr25, %while.cond.38.preheader ]
  ret void
}