File: pr43276.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; 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,538; xml: 953; cs: 573; fortran: 567
file content (87 lines) | stat: -rw-r--r-- 3,167 bytes parent folder | download | duplicates (7)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S < %s -aa-pipeline=basic-aa -passes='require<loops>,jump-threading' | FileCheck %s

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:1"
target triple = "x86_64-unknown-linux-gnu"

@global = external global i8*

define i32 @wibble() {
; CHECK-LABEL: @wibble(
; CHECK-NEXT:  bb19:
; CHECK-NEXT:    [[TMP20:%.*]] = getelementptr i8, i8* undef, i64 16
; CHECK-NEXT:    [[TMP21:%.*]] = load atomic i8*, i8** @global unordered, align 8
; CHECK-NEXT:    [[TMP22:%.*]] = getelementptr inbounds i8, i8* [[TMP21]], i64 936
; CHECK-NEXT:    br label [[BB3:%.*]]
; CHECK:       bb2:
; CHECK-NEXT:    br label [[BB3]]
; CHECK:       bb3:
; CHECK-NEXT:    [[TMP:%.*]] = phi i8* [ [[TMP22]], [[BB19:%.*]] ], [ undef, [[BB2:%.*]] ]
; CHECK-NEXT:    [[TMP4:%.*]] = phi i8* [ [[TMP21]], [[BB19]] ], [ undef, [[BB2]] ]
; CHECK-NEXT:    [[TMP5:%.*]] = bitcast i8* [[TMP]] to i64*
; CHECK-NEXT:    [[TMP6:%.*]] = getelementptr inbounds i8, i8* [[TMP4]], i64 848
; CHECK-NEXT:    [[TMP7:%.*]] = bitcast i8* [[TMP6]] to i8**
; CHECK-NEXT:    br label [[BB11:%.*]]
; CHECK:       bb11:
; CHECK-NEXT:    [[TMP12:%.*]] = load atomic i8*, i8** [[TMP7]] unordered, align 8
; CHECK-NEXT:    [[TMP13:%.*]] = icmp eq i8* [[TMP12]], null
; CHECK-NEXT:    br i1 [[TMP13]], label [[BB17:%.*]], label [[BB16:%.*]]
; CHECK:       bb16:
; CHECK-NEXT:    store atomic i64 undef, i64* [[TMP5]] unordered, align 8
; CHECK-NEXT:    br label [[BB11]]
; CHECK:       bb17:
; CHECK-NEXT:    ret i32 undef
;
bb:
  br label %bb1

bb1:                                              ; preds = %bb
  br label %bb18

bb2:                                              ; No predecessors!
  br label %bb3

bb3:                                              ; preds = %bb19, %bb2
  %tmp = phi i8* [ %tmp22, %bb19 ], [ undef, %bb2 ]
  %tmp4 = phi i8* [ %tmp21, %bb19 ], [ undef, %bb2 ]
  %tmp5 = bitcast i8* %tmp to i64*
  %tmp6 = getelementptr inbounds i8, i8* %tmp4, i64 848
  %tmp7 = bitcast i8* %tmp6 to i8**
  br label %bb11

bb11:                                             ; preds = %bb16, %bb3
  %tmp12 = load atomic i8*, i8** %tmp7 unordered, align 8
  %tmp13 = icmp eq i8* %tmp12, null
  br i1 %tmp13, label %bb17, label %bb14

bb14:                                             ; preds = %bb11
  br label %bb15

bb15:                                             ; preds = %bb14
  br label %bb16

bb16:                                             ; preds = %bb15
  store atomic i64 undef, i64* %tmp5 unordered, align 8
  br label %bb11

bb17:                                             ; preds = %bb11
  ret i32 undef

bb18:                                             ; preds = %bb1
  br label %bb19

bb19:                                             ; preds = %bb18
  %tmp20 = getelementptr i8, i8* undef, i64 16
  %tmp21 = load atomic i8*, i8** @global unordered, align 8
  %tmp22 = getelementptr inbounds i8, i8* %tmp21, i64 936
  br label %bb3
}

define void @zot(i8* align 8 dereferenceable_or_null(16) %arg, i32 %arg1) {
; CHECK-LABEL: @zot(
; CHECK-NEXT:  bb:
; CHECK-NEXT:    ret void
;
bb:
  ret void
}