1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; Debug informations shouldn't affect spill cost. 3; RUN: opt -S -passes=slp-vectorizer %s -o - | FileCheck %s 4 5target triple = "aarch64" 6 7%struct.S = type { i64, i64 } 8 9define void @patatino(i64 %n, i64 %i, ptr %p) !dbg !7 { 10; CHECK-LABEL: @patatino( 11; CHECK-NEXT: entry: 12; CHECK-NEXT: #dbg_value(i64 [[N:%.*]], [[META18:![0-9]+]], !DIExpression(), [[META23:![0-9]+]]) 13; CHECK-NEXT: #dbg_value(i64 [[I:%.*]], [[META19:![0-9]+]], !DIExpression(), [[META24:![0-9]+]]) 14; CHECK-NEXT: #dbg_value(ptr [[P:%.*]], [[META20:![0-9]+]], !DIExpression(), [[META25:![0-9]+]]) 15; CHECK-NEXT: [[X1:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[P]], i64 [[N]], i32 0, !dbg [[DBG26:![0-9]+]] 16; CHECK-NEXT: #dbg_value(i64 poison, [[META21:![0-9]+]], !DIExpression(), [[META27:![0-9]+]]) 17; CHECK-NEXT: #dbg_value(i64 poison, [[META22:![0-9]+]], !DIExpression(), [[META28:![0-9]+]]) 18; CHECK-NEXT: [[X5:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[P]], i64 [[I]], i32 0, !dbg [[DBG29:![0-9]+]] 19; CHECK-NEXT: [[TMP0:%.*]] = load <2 x i64>, ptr [[X1]], align 8, !dbg [[DBG26]], !tbaa [[TBAA30:![0-9]+]] 20; CHECK-NEXT: store <2 x i64> [[TMP0]], ptr [[X5]], align 8, !dbg [[DBG34:![0-9]+]], !tbaa [[TBAA30]] 21; CHECK-NEXT: ret void, !dbg [[DBG35:![0-9]+]] 22; 23entry: 24 call void @llvm.dbg.value(metadata i64 %n, metadata !18, metadata !DIExpression()), !dbg !23 25 call void @llvm.dbg.value(metadata i64 %i, metadata !19, metadata !DIExpression()), !dbg !24 26 call void @llvm.dbg.value(metadata ptr %p, metadata !20, metadata !DIExpression()), !dbg !25 27 %x1 = getelementptr inbounds %struct.S, ptr %p, i64 %n, i32 0, !dbg !26 28 %0 = load i64, ptr %x1, align 8, !dbg !26, !tbaa !27 29 call void @llvm.dbg.value(metadata i64 %0, metadata !21, metadata !DIExpression()), !dbg !32 30 %y3 = getelementptr inbounds %struct.S, ptr %p, i64 %n, i32 1, !dbg !33 31 %1 = load i64, ptr %y3, align 8, !dbg !33, !tbaa !34 32 call void @llvm.dbg.value(metadata i64 %1, metadata !22, metadata !DIExpression()), !dbg !35 33 %x5 = getelementptr inbounds %struct.S, ptr %p, i64 %i, i32 0, !dbg !36 34 store i64 %0, ptr %x5, align 8, !dbg !37, !tbaa !27 35 %y7 = getelementptr inbounds %struct.S, ptr %p, i64 %i, i32 1, !dbg !38 36 store i64 %1, ptr %y7, align 8, !dbg !39, !tbaa !34 37 ret void, !dbg !40 38} 39 40; Function Attrs: nounwind readnone speculatable 41declare void @llvm.dbg.value(metadata, metadata, metadata) #1 42 43attributes #1 = { nounwind readnone speculatable } 44 45!llvm.dbg.cu = !{!0} 46!llvm.module.flags = !{!3, !4, !5} 47!llvm.ident = !{!6} 48 49!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 7.0.0 (trunk 330946) (llvm/trunk 330976)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 50!1 = !DIFile(filename: "slp-reduced.c", directory: "/usr2/gberry/local/loop-align") 51!2 = !{} 52!3 = !{i32 2, !"Dwarf Version", i32 4} 53!4 = !{i32 2, !"Debug Info Version", i32 3} 54!5 = !{i32 1, !"wchar_size", i32 4} 55!6 = !{!"clang version 7.0.0 (trunk 330946) (llvm/trunk 330976)"} 56!7 = distinct !DISubprogram(name: "patatino", scope: !1, file: !1, line: 6, type: !8, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !17) 57!8 = !DISubroutineType(types: !9) 58!9 = !{null, !10, !10, !11} 59!10 = !DIBasicType(name: "long int", size: 64, encoding: DW_ATE_signed) 60!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) 61!12 = !DIDerivedType(tag: DW_TAG_typedef, name: "S", file: !1, line: 4, baseType: !13) 62!13 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !1, line: 1, size: 128, elements: !14) 63!14 = !{!15, !16} 64!15 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !13, file: !1, line: 2, baseType: !10, size: 64) 65!16 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !13, file: !1, line: 3, baseType: !10, size: 64, offset: 64) 66!17 = !{!18, !19, !20, !21, !22} 67!18 = !DILocalVariable(name: "n", arg: 1, scope: !7, file: !1, line: 6, type: !10) 68!19 = !DILocalVariable(name: "i", arg: 2, scope: !7, file: !1, line: 6, type: !10) 69!20 = !DILocalVariable(name: "p", arg: 3, scope: !7, file: !1, line: 6, type: !11) 70!21 = !DILocalVariable(name: "x", scope: !7, file: !1, line: 7, type: !10) 71!22 = !DILocalVariable(name: "y", scope: !7, file: !1, line: 8, type: !10) 72!23 = !DILocation(line: 6, column: 15, scope: !7) 73!24 = !DILocation(line: 6, column: 23, scope: !7) 74!25 = !DILocation(line: 6, column: 29, scope: !7) 75!26 = !DILocation(line: 7, column: 19, scope: !7) 76!27 = !{!28, !29, i64 0} 77!28 = !{!"", !29, i64 0, !29, i64 8} 78!29 = !{!"long", !30, i64 0} 79!30 = !{!"omnipotent char", !31, i64 0} 80!31 = !{!"Simple C/C++ TBAA"} 81!32 = !DILocation(line: 7, column: 10, scope: !7) 82!33 = !DILocation(line: 8, column: 19, scope: !7) 83!34 = !{!28, !29, i64 8} 84!35 = !DILocation(line: 8, column: 10, scope: !7) 85!36 = !DILocation(line: 9, column: 10, scope: !7) 86!37 = !DILocation(line: 9, column: 12, scope: !7) 87!38 = !DILocation(line: 10, column: 10, scope: !7) 88!39 = !DILocation(line: 10, column: 12, scope: !7) 89!40 = !DILocation(line: 11, column: 1, scope: !7) 90