File: pr37323.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 (30 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download | duplicates (8)
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
;RUN: opt -verify-dom-info -passes='loop-simplify,require<postdomtree>,require<opt-remark-emit>,loop-mssa(licm),function(adce)' -S -o - %s | FileCheck %s

target triple = "x86_64-unknown-linux-gnu"

@c = external global i16, align 1

;Make sure this test do not crash while accessing PostDomTree which is not
;preserved in LICM.
;
;CHECK-LABEL: fn1()
;CHECK-LABEL: for.cond.loopexit.split.loop.exit
;CHECK-LABEL: for.cond.loopexit.split.loop.exit1
define void @fn1() {
entry:
  br label %for.cond

for.cond:                                         ; preds = %if.end, %for.cond1, %entry
  %0 = phi i16 [ undef, %entry ], [ ptrtoint (ptr @c to i16), %if.end ], [ %.mux, %for.cond1 ]
  br i1 undef, label %for.cond1, label %for.end8

for.cond1:                                        ; preds = %if.end, %for.cond
  %.mux = select i1 undef, i16 undef, i16 ptrtoint (ptr @c to i16)
  br i1 undef, label %for.cond, label %if.end

if.end:                                           ; preds = %for.cond1
  br i1 undef, label %for.cond, label %for.cond1

for.end8:                                         ; preds = %for.cond
  ret void
}