| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s |
| 3 |
|
| 4 |
; Function Attrs: nounwind |
| 5 |
define dso_local void @test(ptr nocapture readonly %Fptr, ptr nocapture %Vptr) local_unnamed_addr #0 !dbg !10 { |
| 6 |
; CHECK-LABEL: test: |
| 7 |
; CHECK: .loc 1 1 0 # test.c:1:0 |
| 8 |
; CHECK-NEXT: .cfi_sections .debug_frame |
| 9 |
; CHECK-NEXT: .cfi_startproc |
| 10 |
; CHECK-NEXT: .Lfunc_gep0: |
| 11 |
; CHECK-NEXT: addis 2, 12, .TOC.-.Lfunc_gep0@ha |
| 12 |
; CHECK-NEXT: addi 2, 2, .TOC.-.Lfunc_gep0@l |
| 13 |
; CHECK-NEXT: .Lfunc_lep0: |
| 14 |
; CHECK-NEXT: .localentry test, .Lfunc_lep0-.Lfunc_gep0 |
| 15 |
; CHECK-NEXT: # %bb.0: # %entry |
| 16 |
; CHECK-NEXT: #DEBUG_VALUE: test:Fptr <- $x3 |
| 17 |
; CHECK-NEXT: #DEBUG_VALUE: test:Vptr <- $x4 |
| 18 |
; CHECK-NEXT: vspltisw 2, 1 |
| 19 |
; CHECK-NEXT: .Ltmp0: |
| 20 |
; CHECK-NEXT: .loc 1 2 38 prologue_end # test.c:2:38 |
| 21 |
; CHECK-NEXT: lfs 0, 0(3) |
| 22 |
; CHECK-NEXT: addis 3, 2, .LCPI0_0@toc@ha |
| 23 |
; CHECK-NEXT: .Ltmp1: |
| 24 |
; CHECK-NEXT: .loc 1 0 38 is_stmt 0 # test.c:0:38 |
| 25 |
; CHECK-NEXT: xvcvsxwdp 1, 34 |
| 26 |
; CHECK-NEXT: lfd 2, .LCPI0_0@toc@l(3) |
| 27 |
; CHECK-NEXT: .loc 1 2 27 # test.c:2:27 |
| 28 |
; CHECK-NEXT: xssubdp 1, 1, 0 |
| 29 |
; CHECK-NEXT: .loc 1 2 45 # test.c:2:45 |
| 30 |
; CHECK-NEXT: xsadddp 1, 1, 2 |
| 31 |
; CHECK-NEXT: .Ltmp2: |
| 32 |
; CHECK-NEXT: #DEBUG_VALUE: test:Val <- undef |
| 33 |
; CHECK-NEXT: .loc 1 0 45 # test.c:0:45 |
| 34 |
; CHECK-NEXT: xxlxor 2, 2, 2 |
| 35 |
; CHECK-NEXT: .loc 1 3 26 is_stmt 1 # test.c:3:26 |
| 36 |
; CHECK-NEXT: xxmrghd 0, 0, 2 |
| 37 |
; CHECK-NEXT: xvcvdpsp 34, 0 |
| 38 |
; CHECK-NEXT: xxmrghd 1, 2, 1 |
| 39 |
; CHECK-NEXT: xvcvdpsp 35, 1 |
| 40 |
; CHECK-NEXT: vmrgew 2, 2, 3 |
| 41 |
; CHECK-NEXT: .loc 1 3 9 is_stmt 0 # test.c:3:9 |
| 42 |
; CHECK-NEXT: xxswapd 0, 34 |
| 43 |
; CHECK-NEXT: stxvd2x 0, 0, 4 |
| 44 |
; CHECK-NEXT: .loc 1 4 1 is_stmt 1 # test.c:4:1 |
| 45 |
; CHECK-NEXT: blr |
| 46 |
; CHECK-NEXT: .Ltmp3: |
| 47 |
entry: |
| 48 |
call void @llvm.dbg.value(metadata ptr %Fptr, metadata !19, metadata !DIExpression()), !dbg !22 |
| 49 |
call void @llvm.dbg.value(metadata ptr %Vptr, metadata !20, metadata !DIExpression()), !dbg !22 |
| 50 |
%0 = load float, ptr %Fptr, align 4, !dbg !23, !tbaa !24 |
| 51 |
%conv = fpext float %0 to double, !dbg !28 |
| 52 |
%sub = fsub double 1.000000e+00, %conv, !dbg !29 |
| 53 |
%sub1 = fadd double %sub, -4.300000e+00, !dbg !30 |
| 54 |
%conv2 = fptrunc double %sub1 to float, !dbg !31 |
| 55 |
call void @llvm.dbg.value(metadata float %conv2, metadata !21, metadata !DIExpression()), !dbg !22 |
| 56 |
%vecinit4 = insertelement <4 x float> <float poison, float 0.000000e+00, float 0.000000e+00, float poison>, float %conv2, i32 0, !dbg !32 |
| 57 |
%vecinit5 = insertelement <4 x float> %vecinit4, float %0, i32 3, !dbg !32 |
| 58 |
store <4 x float> %vecinit5, ptr %Vptr, align 16, !dbg !33, !tbaa !34 |
| 59 |
ret void, !dbg !35 |
| 60 |
} |
| 61 |
|
| 62 |
declare void @llvm.dbg.value(metadata, metadata, metadata) |
| 63 |
|
| 64 |
attributes #0 = { nounwind } |
| 65 |
|
| 66 |
!llvm.dbg.cu = !{!0} |
| 67 |
!llvm.module.flags = !{!6, !7, !8} |
| 68 |
!llvm.ident = !{!9} |
| 69 |
|
| 70 |
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, splitDebugInlining: false, nameTableKind: None) |
| 71 |
!1 = !DIFile(filename: "test.c", directory: "") |
| 72 |
!2 = !{} |
| 73 |
!3 = !{!4, !5} |
| 74 |
!4 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) |
| 75 |
!5 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float) |
| 76 |
!6 = !{i32 7, !"Dwarf Version", i32 4} |
| 77 |
!7 = !{i32 2, !"Debug Info Version", i32 3} |
| 78 |
!8 = !{i32 1, !"wchar_size", i32 4} |
| 79 |
!9 = !{!"clang version 12.0.0"} |
| 80 |
!10 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, type: !11, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !18) |
| 81 |
!11 = !DISubroutineType(types: !12) |
| 82 |
!12 = !{null, !13, !14} |
| 83 |
!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64) |
| 84 |
!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !15, size: 64) |
| 85 |
!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 128, flags: DIFlagVector, elements: !16) |
| 86 |
!16 = !{!17} |
| 87 |
!17 = !DISubrange(count: 4) |
| 88 |
!18 = !{!19, !20, !21} |
| 89 |
!19 = !DILocalVariable(name: "Fptr", arg: 1, scope: !10, file: !1, line: 1, type: !13) |
| 90 |
!20 = !DILocalVariable(name: "Vptr", arg: 2, scope: !10, file: !1, line: 1, type: !14) |
| 91 |
!21 = !DILocalVariable(name: "Val", scope: !10, file: !1, line: 2, type: !4) |
| 92 |
!22 = !DILocation(line: 0, scope: !10) |
| 93 |
!23 = !DILocation(line: 2, column: 38, scope: !10) |
| 94 |
!24 = !{!25, !25, i64 0} |
| 95 |
!25 = !{!"float", !26, i64 0} |
| 96 |
!26 = !{!"omnipotent char", !27, i64 0} |
| 97 |
!27 = !{!"Simple C/C++ TBAA"} |
| 98 |
!28 = !DILocation(line: 2, column: 29, scope: !10) |
| 99 |
!29 = !DILocation(line: 2, column: 27, scope: !10) |
| 100 |
!30 = !DILocation(line: 2, column: 45, scope: !10) |
| 101 |
!31 = !DILocation(line: 2, column: 15, scope: !10) |
| 102 |
!32 = !DILocation(line: 3, column: 26, scope: !10) |
| 103 |
!33 = !DILocation(line: 3, column: 9, scope: !10) |
| 104 |
!34 = !{!26, !26, i64 0} |
| 105 |
!35 = !DILocation(line: 4, column: 1, scope: !10) |