xref: /llvm-project/llvm/test/Transforms/MetaRenamer/only-inst.ll (revision da598733544a4e299aebb3552a2c83f680cbd42d)
1; RUN: opt -passes=metarenamer -rename-only-inst=1 -S < %s | FileCheck %s
2target triple = "x86_64-pc-linux-gnu"
3
4; CHECK: %struct.foo_xxx = type { i32, float, %struct.bar_xxx }
5; CHECK: %struct.bar_xxx = type { i32, double }
6%struct.bar_xxx = type { i32, double }
7%struct.foo_xxx = type { i32, float, %struct.bar_xxx }
8
9; CHECK: @global_3_xxx = common global
10@global_3_xxx = common global i32 0, align 4
11
12; CHECK-LABEL: func_4_xxx
13; CHECK-NOT: %1
14; CHECK-NOT: %2
15; CHECK-NOT: %3
16; CHECK-NOT: %4
17; CHECK: %.int_arg = call i64 @len()
18define void @func_4_xxx(ptr sret(%struct.foo_xxx) %agg.result) nounwind uwtable ssp {
19  %1 = alloca %struct.foo_xxx, align 8
20  store i32 1, ptr %1, align 4
21  %2 = getelementptr inbounds %struct.foo_xxx, ptr %1, i32 0, i32 1
22  store float 2.000000e+00, ptr %2, align 4
23  %3 = getelementptr inbounds %struct.foo_xxx, ptr %1, i32 0, i32 2
24  store i32 3, ptr %3, align 4
25  %4 = getelementptr inbounds %struct.bar_xxx, ptr %3, i32 0, i32 1
26  store double 4.000000e+00, ptr %4, align 8
27  %.int_arg = call i64 @len()
28  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.result, ptr align 8 %1, i64 %.int_arg, i1 false)
29  ret void
30}
31
32declare i64 @len()
33declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind
34