File: region_multiexit_partialwrite.ll

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (44 lines) | stat: -rw-r--r-- 1,335 bytes parent folder | download | duplicates (9)
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
; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,polly-codegen' -polly-import-jscop-postfix=transformed -S < %s | FileCheck %s
;
; This text case has a partial write of PHI in a region-statement. It
; requires that the new PHINode from the region's exiting block is
; generated before before the partial memory write.
;
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"

define void @region_multiexit_partialwrite(ptr %arg, i64 %arg1, ptr %arg2) {
bb:
  br label %bb3

bb3:
  %tmp = phi i64 [ %tmp17, %bb10 ], [ 1, %bb ]
  %tmp4 = getelementptr inbounds i32, ptr %arg, i64 %tmp
  %tmp5 = load i32, ptr %tmp4, align 4
  %tmp6 = icmp slt i32 %tmp5, 0
  br i1 %tmp6, label %bb7, label %bb9

bb7:
  %tmp8 = select i1 undef, i32 -2147483648, i32 undef
  br label %bb10

bb9:
  br label %bb10

bb10:
  %tmp11 = phi i32 [ %tmp8, %bb7 ], [ undef, %bb9 ]
  %tmp16 = getelementptr inbounds i32, ptr %arg2, i64 %tmp
  store i32 %tmp11, ptr %tmp16, align 4
  %tmp17 = add nuw i64 %tmp, 1
  %tmp18 = icmp eq i64 %tmp17, %arg1
  br i1 %tmp18, label %bb19, label %bb3

bb19:
  ret void
}


; CHECK:      polly.stmt.bb10.exit:
; CHECK-NEXT:   %polly.tmp11 = phi i32 [ %p_tmp8, %polly.stmt.bb7 ], [ undef, %polly.stmt.bb9 ]

; CHECK: polly.stmt.bb10.exit.Stmt_bb3__TO__bb10_Write1.partial:
; CHECK:   store i32 %polly.tmp11