File: addrmode-keepdeadphis.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 (50 lines) | stat: -rw-r--r-- 1,874 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
49
50
; RUN: llc -march=hexagon < %s | FileCheck %s

; Make sure that the addressing mode optimization does not propagate
; an add instruction where the base register would have a different
; reaching def.

; CHECK-LABEL: f0.1:
; CHECK-LABEL: %b0
; CHECK:         r17 = add(r{{[0-9]+}},#8)
; CHECK-LABEL: %b1
; CHECK:         r16 = r0
; CHECK-LABEL: %b2
; CHECK:         memd(r17+#0)

target triple = "hexagon"

%s.0 = type { i8, i8, %s.1, i32 }
%s.1 = type { %s.2, [128 x i8] }
%s.2 = type { i8, i8, i64, %s.3 }
%s.3 = type { i8 }

define void @f0.1() local_unnamed_addr #0 align 2 {
b0:
  %v0 = alloca %s.0, align 8
  %v1 = getelementptr inbounds %s.0, %s.0* %v0, i32 0, i32 1
  store i8 4, i8* %v1, align 1
  %v2 = call signext i8 @f1.2(%s.3* undef) #0
  %v3 = getelementptr inbounds %s.0, %s.0* %v0, i32 0, i32 2, i32 0, i32 0
  %v4 = getelementptr inbounds %s.0, %s.0* %v0, i32 0, i32 2, i32 0, i32 3, i32 0
  store i8 -1, i8* %v4, align 8
  br i1 undef, label %b1, label %b2

b1:                                               ; preds = %b0
  %v5 = call dereferenceable(12) %s.3* @f2.3(%s.3* nonnull undef, %s.3* nonnull dereferenceable(80) undef) #0
  %v6 = call signext i8 @f1.2(%s.3* undef) #0
  %v7 = call dereferenceable(12) %s.3* @f3(%s.3* nonnull %v5, i16 signext undef) #0
  br label %b2

b2:                                               ; preds = %b1, %b0
  call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 undef, i8* align 8 %v3, i32 48, i1 false)
  ret void
}

declare signext i8 @f1.2(%s.3*) #0
declare dereferenceable(12) %s.3* @f2.3(%s.3*, %s.3* dereferenceable(80)) #0
declare dereferenceable(12) %s.3* @f3(%s.3*, i16 signext) #0
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) #1

attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="-long-calls" }
attributes #1 = { argmemonly nounwind }