File: partial_write_impossible_restriction.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 (58 lines) | stat: -rw-r--r-- 2,702 bytes parent folder | download | duplicates (3)
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
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
;
; The isl scheduler isolates %cond.false into two instances.
; A partial write access in one of the instances was never executed,
; which caused problems when querying for its index expression, which
; is not available in that case.
;
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"

define void @partial_write_impossible_restriction(ptr %.pn) {
entry:
  br i1 undef, label %invoke.cont258, label %cond.true.i.i.i.i1007

cond.true.i.i.i.i1007:
  br label %invoke.cont258

invoke.cont258:
  br label %invoke.cont274

invoke.cont274:                                   ; preds = %invoke.cont258
  %tmp4 = load ptr, ptr undef
  %tmp5 = load i32, ptr undef
  %tmp6 = zext i32 %tmp5 to i64
  %tmp7 = sext i32 %tmp5 to i64
  br label %for.body344

for.body344:                                      ; preds = %cond.end, %invoke.cont274
  %indvars.iv1602 = phi i64 [ 0, %invoke.cont274 ], [ %indvars.iv.next1603, %cond.end ]
  %indvars.iv.next1603 = add nuw nsw i64 %indvars.iv1602, 1
  %cmp347 = icmp eq i64 %indvars.iv.next1603, %tmp6
  br i1 %cmp347, label %cond.end, label %cond.false

cond.false:                                       ; preds = %for.body344
  %add.ptr.i1128 = getelementptr inbounds i32, ptr %tmp4, i64 %indvars.iv.next1603
  %cond.in.sroa.speculate.load.cond.false = load i32, ptr %add.ptr.i1128
  br label %cond.end

cond.end:                                         ; preds = %cond.false, %for.body344
  %cond.in.sroa.speculated = phi i32 [ %cond.in.sroa.speculate.load.cond.false, %cond.false ], [ undef, %for.body344 ]
  %add.ptr.i1132 = getelementptr inbounds i32, ptr %.pn, i64 %indvars.iv1602
  store i32 undef, ptr %add.ptr.i1132
  %cmp342 = icmp slt i64 %indvars.iv.next1603, %tmp7
  br i1 %cmp342, label %for.body344, label %if.then.i.i1141.loopexit

if.then.i.i1141.loopexit:                         ; preds = %cond.end
  ret void
}


; CHECK-LABEL: polly.stmt.cond.false:
; CHECK:         %polly.access..pn{{[0-9]*}} = getelementptr i32, ptr %.pn, i64 %polly.indvar
; CHECK:         store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_, ptr %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
; CHECK:         br label %polly.merge

; CHECK-LABEL: polly.stmt.cond.false{{[0-9]*}}:
; CHECK:         %polly.access..pn{{[0-9]*}} = getelementptr i32, ptr %.pn, i64 0
; CHECK:         store i32 %cond.in.sroa.speculate.load.cond.false_p_scalar_{{[0-9]*}}, ptr %polly.access..pn{{[0-9]*}}, align 4, !alias.scope !0, !noalias !3
; CHECK:         br label %polly.stmt.cond.end{{[0-9]*}}