File: phi_after_error_block_outside_of_scop.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-20
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,436 kB
  • sloc: cpp: 5,593,990; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (53 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (14)
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
; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s

; Make sure code generation does not break in case an 'error block' is detected
; outside of the scope. In this situation, we should not affect code generation.

; CHECK:        polly.cond:
; CHECK-NEXT:   ptrtoint float* %tmp8 to i64
; CHECK-NEXT:   icmp sle i64
; CHECK-NEXT:   ptrtoint float* %tmp8 to i64
; CHECK-NEXT:   icmp sge i64
; CHECK-NEXT:   or i1
; CHECK-NEXT:   label %polly.then, label %polly.else

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

declare void @widget()

define void @baz() {
bb:
  br label %bb1

bb1:
  br i1 undef, label %bb5, label %bb2

bb2:
  %tmp = call i8* @pluto()
  %tmp4 = bitcast i8* %tmp to float*
  br label %bb6

bb5:
  call void @widget()
  br label %bb7

bb6:
  br label %bb7

bb7:
  %tmp8 = phi float* [ %tmp4, %bb6 ], [ null, %bb5 ]
  br label %bb9

bb9:
  %tmp10 = icmp eq float* %tmp8, null
  br i1 %tmp10, label %bb12, label %bb11

bb11:
  br label %bb12

bb12:
  %tmp13 = phi float* [ undef, %bb9 ], [ undef, %bb11 ]
  ret void
}

declare i8* @pluto()