File: const-combine.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 (48 lines) | stat: -rw-r--r-- 1,523 bytes parent folder | download | duplicates (14)
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
; RUN: llc -march=hexagon -disable-const64=1 < %s | FileCheck %s
; CHECK: combine(##4917,#88)

target triple = "hexagon"

%s.1 = type { %s.2 }
%s.2 = type { i32, i8* }

@g0 = internal constant [61 x i8] c"............................................................\00", align 4
@g1 = internal constant %s.1 { %s.2 { i32 8, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @g0, i32 0, i32 0) } }, align 4

define void @f0(i32 %a0) local_unnamed_addr #0 {
b0:
  %v0 = alloca i8*, align 4
  store i8* null, i8** %v0, align 4, !tbaa !0
  call void @f1(i32 88, i16 zeroext 4917, i8** nonnull %v0) #0
  %v1 = load i8*, i8** %v0, align 4, !tbaa !0
  %v2 = icmp eq i8* %v1, null
  br i1 %v2, label %b1, label %b2

b1:                                               ; preds = %b0
  call void @f2(%s.1* nonnull @g1) #0
  br label %b3

b2:                                               ; preds = %b0
  %v3 = call i32 @f3(i8 zeroext 22, i8* null, i8* nonnull %v1, i16 zeroext 88) #0
  %v4 = load i8*, i8** %v0, align 4, !tbaa !0
  call void @f4(i8* %v4, i32 88) #0
  br label %b3

b3:                                               ; preds = %b2, %b1
  ret void
}

declare void @f1(i32, i16 zeroext, i8**) local_unnamed_addr

declare void @f2(%s.1*) local_unnamed_addr

declare i32 @f3(i8 zeroext, i8*, i8*, i16 zeroext) local_unnamed_addr

declare void @f4(i8*, i32) local_unnamed_addr

attributes #0 = { nounwind optsize }

!0 = !{!1, !1, i64 0}
!1 = !{!"any pointer", !2}
!2 = !{!"omnipotent char", !3}
!3 = !{!"Simple C/C++ TBAA"}