File: non-affine-region-exit-phi-incoming-synthesize.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 (33 lines) | stat: -rw-r--r-- 1,126 bytes parent folder | download | duplicates (23)
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
; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
;
; This caused the code generation to generate invalid code as the same BBMap was
; used for the whole non-affine region. When %add is synthesized for the
; incoming value of subregion_if first, the code for it was generated into
; subregion_if, but reused for the incoming value of subregion_exit, although it
; is not dominated by subregion_if.
;
; CHECK-LABEL: polly.stmt.subregion_entry:
; CHECK:         %[[R0:[0-9]*]] = add i32 %n, -2
;
; CHECK-LABEL: polly.stmt.subregion_if:
; CHECK:         %[[R1:[0-9]*]] = add i32 %n, -2
;
; CHECK-LABEL: polly.stmt.subregion_exit.region_exiting:
; CHECK:         %polly.retval = phi i32 [ %[[R1]], %polly.stmt.subregion_if ], [ %[[R0]], %polly.stmt.subregion_entry ]

define i32 @func(i32 %n){
entry:
  br label %subregion_entry

subregion_entry:
  %add = add nsw i32 %n, -2
  %cmp = fcmp ogt float undef, undef
  br i1 %cmp, label %subregion_if, label %subregion_exit

subregion_if:
  br label %subregion_exit

subregion_exit:
  %retval = phi i32 [ %add, %subregion_if ], [ %add, %subregion_entry ]
  ret i32 %retval
}