File: invariant_cannot_handle_void.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 (73 lines) | stat: -rw-r--r-- 3,040 bytes parent folder | download | duplicates (5)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
; RUN: opt %loadPolly -polly-invariant-load-hoisting=true -polly-print-scops -disable-output < %s | FileCheck %s --check-prefix=SCOP
; RUN: opt %loadPolly -S -polly-codegen -polly-invariant-load-hoisting=true %s | FileCheck %s
;
; The offset of the %tmp1 load wrt. to %buff (62 bytes) is not divisible
; by the type size (i32 = 4 bytes), thus we will have to represent %buff
; with a smaller type. In this case i16 is sufficient to represent the
; 62 byte offset accurately.
;
; SCOP:    Invariant Accesses: {
; SCOP:            ReadAccess :=	[Reduction Type: NONE] [Scalar: 0]
; SCOP:                { Stmt_if_end_6[] -> MemRef_buff[o0] : 31 <= o0 <= 32 };
; SCOP:            Execution Context: {  :  }
; SCOP:    }
; SCOP:    Arrays {
; SCOP:        i16 MemRef_buff[*]; // Element size 2
; SCOP:        i32 MemRef_key_0; // Element size 4
; SCOP:    }
;
; CHECK-LABEL: polly.preload.begin:
; CHECK-NEXT:    %polly.access.buff = getelementptr i16, ptr %buff, i64 31
; CHECK-NEXT:    %polly.access.buff.load = load i32, ptr %polly.access.buff, align 4
; CHECK-NEXT:    store i32 %polly.access.buff.load, ptr %tmp1.preload.s2a
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

; Function Attrs: nounwind uwtable
define void @sudecrypt(ptr %buff) #0 {
entry:
  br i1 undef, label %cleanup, label %if.end

if.end:                                           ; preds = %entry
  br i1 undef, label %if.end.6, label %if.then.5

if.then.5:                                        ; preds = %if.end
  unreachable

if.end.6:                                         ; preds = %if.end
  %add.ptr = getelementptr inbounds i8, ptr %buff, i64 62
  %tmp1 = load i32, ptr %add.ptr, align 4, !tbaa !1
  br i1 false, label %if.then.13, label %switch.early.test

switch.early.test:                                ; preds = %if.end.6
  switch i32 0, label %if.end.16 [
    i32 956, label %if.then.13
    i32 520, label %if.then.13
  ]

if.then.13:                                       ; preds = %switch.early.test, %switch.early.test, %if.end.6
  br label %if.end.16

if.end.16:                                        ; preds = %if.then.13, %switch.early.test
  %key.0 = phi i32 [ undef, %if.then.13 ], [ 0, %switch.early.test ]
  br i1 undef, label %if.end.34, label %if.then.19

if.then.19:                                       ; preds = %if.end.16
  unreachable

if.end.34:                                        ; preds = %if.end.16
  unreachable

cleanup:                                          ; preds = %entry
  ret void
}

attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = !{!"clang version 3.8.0 (trunk 250010) (llvm/trunk 250018)"}
!1 = !{!2, !2, i64 0}
!2 = !{!"int", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}