xref: /llvm-project/llvm/test/Transforms/PGOProfile/memop_clone.ll (revision 9ff36df5a4a7d52c51e950522870bb64912688d2)
1b5d884a3SFangrui Song; RUN: opt < %s -passes=pgo-memop-opt -verify-dom-info -S | FileCheck %s
2cee313d2SEric Christopher
3*9ff36df5SFangrui Songdefine i32 @test(ptr %a, ptr %b) !prof !1 {
4ad1d60c3SIvan Kosarev; CHECK-LABEL: test
5cee313d2SEric Christopher; CHECK: MemOP.Case.3:
6*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i32(ptr undef, ptr %a, i32 3, i1 false)
7cee313d2SEric Christopher; CHECK: MemOP.Case.2:
8*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i32(ptr undef, ptr %a, i32 2, i1 false)
9cee313d2SEric Christopher; CHECK: MemOP.Default:
10*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i32(ptr undef, ptr %a, i32 undef, i1 false)
11cee313d2SEric Christopher; CHECK: MemOP.Case.33:
12*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i64(ptr undef, ptr %b, i64 3, i1 false)
137c5d2becSJonathan Roelofs; CHECK: MemOP.Case.24:
14*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i64(ptr undef, ptr %b, i64 2, i1 false)
15cee313d2SEric Christopher; CHECK: MemOP.Default2:
16*9ff36df5SFangrui Song; CHECK: tail call void @llvm.memcpy.p0.p0.i64(ptr undef, ptr %b, i64 undef, i1 false)
17*9ff36df5SFangrui Song  tail call void @llvm.memcpy.p0.p0.i32(ptr undef, ptr %a, i32 undef, i1 false), !prof !2
18*9ff36df5SFangrui Song  tail call void @llvm.memcpy.p0.p0.i64(ptr undef, ptr %b, i64 undef, i1 false), !prof !2
19cee313d2SEric Christopher  unreachable
20cee313d2SEric Christopher}
21cee313d2SEric Christopher
22*9ff36df5SFangrui Songdeclare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1)
23*9ff36df5SFangrui Songdeclare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1)
24cee313d2SEric Christopher
25cee313d2SEric Christopher!1 = !{!"function_entry_count", i64 5170}
26cee313d2SEric Christopher!2 = !{!"VP", i32 1, i64 2585, i64 3, i64 1802, i64 2, i64 783}
27cee313d2SEric Christopher
28