File: only-inst.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (33 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (10)
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
; RUN: opt -passes=metarenamer -rename-only-inst=1 -S < %s | FileCheck %s
target triple = "x86_64-pc-linux-gnu"

; CHECK: %struct.foo_xxx = type { i32, float, %struct.bar_xxx }
; CHECK: %struct.bar_xxx = type { i32, double }
%struct.bar_xxx = type { i32, double }
%struct.foo_xxx = type { i32, float, %struct.bar_xxx }

; CHECK: @global_3_xxx = common global
@global_3_xxx = common global i32 0, align 4

; CHECK-LABEL: func_4_xxx
; CHECK-NOT: %1
; CHECK-NOT: %2
; CHECK-NOT: %3
; CHECK-NOT: %4
; CHECK: %.int_arg = call i64 @len()
define void @func_4_xxx(ptr sret(%struct.foo_xxx) %agg.result) nounwind uwtable ssp {
  %1 = alloca %struct.foo_xxx, align 8
  store i32 1, ptr %1, align 4
  %2 = getelementptr inbounds %struct.foo_xxx, ptr %1, i32 0, i32 1
  store float 2.000000e+00, ptr %2, align 4
  %3 = getelementptr inbounds %struct.foo_xxx, ptr %1, i32 0, i32 2
  store i32 3, ptr %3, align 4
  %4 = getelementptr inbounds %struct.bar_xxx, ptr %3, i32 0, i32 1
  store double 4.000000e+00, ptr %4, align 8
  %.int_arg = call i64 @len()
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.result, ptr align 8 %1, i64 %.int_arg, i1 false)
  ret void
}

declare i64 @len()
declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind