xref: /llvm-project/llvm/test/CodeGen/X86/fastisel-memset-flush.ll (revision 6e83c0a1cbfdb0c0f13c282312c47c7945970f55)
1; RUN: llc -mtriple=x86_64 -O0 < %s | FileCheck %s
2
3define dso_local void @foo() !dbg !7 {
4entry:
5  %a = alloca i32, align 4
6  store i32 0, ptr %a, align 4, !dbg !9
7  %0 = bitcast ptr %a to ptr, !dbg !10
8  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 -86, i64 4, i1 false), !dbg !10
9  %1 = bitcast ptr %a to ptr, !dbg !11
10  call void @other(ptr %1), !dbg !12
11  ret void, !dbg !13
12}
13; CHECK:      callq memset
14; CHECK-NEXT: .loc 1 9 9
15; CHECK-NEXT: leaq
16; CHECK-NEXT: .loc 1 9 3
17; CHECK-NEXT: callq other
18
19declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg)
20
21declare dso_local void @other(ptr)
22
23!llvm.dbg.cu = !{!0}
24!llvm.module.flags = !{!3, !4, !5}
25!llvm.ident = !{!6}
26
27!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0 (https://github.com/llvm/llvm-project eaae6fdf67e1f61599331d69a41a7dafe6199667)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, splitDebugInlining: false, nameTableKind: None)
28!1 = !DIFile(filename: "memset-test.c", directory: "/home/probinson/projects/scratch")
29!2 = !{}
30!3 = !{i32 7, !"Dwarf Version", i32 4}
31!4 = !{i32 2, !"Debug Info Version", i32 3}
32!5 = !{i32 1, !"wchar_size", i32 4}
33!6 = !{!"clang version 12.0.0 (https://github.com/llvm/llvm-project eaae6fdf67e1f61599331d69a41a7dafe6199667)"}
34!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 4, type: !8, scopeLine: 5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
35!8 = !DISubroutineType(types: !2)
36!9 = !DILocation(line: 6, column: 7, scope: !7)
37!10 = !DILocation(line: 8, column: 3, scope: !7)
38!11 = !DILocation(line: 9, column: 9, scope: !7)
39!12 = !DILocation(line: 9, column: 3, scope: !7)
40!13 = !DILocation(line: 10, column: 1, scope: !7)
41