58 lines · plain
1; RUN: opt < %s -passes=mem2reg -S | FileCheck %s2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6define dso_local x86_fp80 @powixf2(i1 %arg) !dbg !1 {7entry:8 %r = alloca x86_fp80, align 169 call void @llvm.dbg.declare(metadata ptr %r, metadata !14, metadata !DIExpression()), !dbg !1510 br i1 %arg, label %if.then, label %if.end, !dbg !1611 12if.then: ; preds = %entry13; CHECK-LABEL: if.then:14; CHECK: %mul = fmul x86_fp8015; CHECK: #dbg_value(x86_fp80 %mul, {{.*}}, !DIExpression(),16 %mul = fmul x86_fp80 undef, undef, !dbg !1817 store x86_fp80 %mul, ptr %r, align 16, !dbg !1818 br label %if.end, !dbg !2019 20if.end: ; preds = %if.then, %entry21; CHECK-LABEL: if.end:22; CHECK: %r.0 = phi x86_fp8023; CHECK: #dbg_value(x86_fp80 %r.0, {{.*}}, !DIExpression(),24 %out = load x86_fp80, ptr %r, align 16, !dbg !2125 ret x86_fp80 %out, !dbg !2226}27 28declare void @llvm.dbg.declare(metadata, metadata, metadata) #029 30attributes #0 = { nounwind readnone speculatable }31 32!llvm.dbg.cu = !{}33!llvm.module.flags = !{!0}34 35!0 = !{i32 2, !"Debug Info Version", i32 3}36!1 = distinct !DISubprogram(name: "__powixf2", scope: !2, file: !2, line: 22, type: !3, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, unit: !11, retainedNodes: !13)37!2 = !DIFile(filename: "powixf2.c", directory: "")38!3 = !DISubroutineType(types: !4)39!4 = !{!5, !5, !6}40!5 = !DIBasicType(name: "long double", size: 128, encoding: DW_ATE_float)41!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "si_int", file: !7, line: 28, baseType: !8)42!7 = !DIFile(filename: "int_types.h", directory: "")43!8 = !DIDerivedType(tag: DW_TAG_typedef, name: "int32_t", file: !9, line: 39, baseType: !10)44!9 = !DIFile(filename: "/usr/include/stdint.h", directory: "")45!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)46!11 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 7.0.0 () ()", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !12)47!12 = !{}48!13 = !{!14}49!14 = !DILocalVariable(name: "r", scope: !1, file: !2, line: 25, type: !5)50!15 = !DILocation(line: 25, column: 17, scope: !1)51!16 = !DILocation(line: 28, column: 13, scope: !17)52!17 = distinct !DILexicalBlock(scope: !1, file: !2, line: 27, column: 5)53!18 = !DILocation(line: 29, column: 15, scope: !19)54!19 = distinct !DILexicalBlock(scope: !17, file: !2, line: 28, column: 13)55!20 = !DILocation(line: 29, column: 13, scope: !19)56!21 = !DILocation(line: 35, column: 22, scope: !1)57!22 = !DILocation(line: 35, column: 5, scope: !1)58