brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · a21b857 Raw
61 lines · plain
1; RUN: llc < %s | FileCheck %s -check-prefix=ASM2; RUN: llc < %s -O0 -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -stop-after livedebugvalues -o - | FileCheck %s -check-prefix=MIR3 4 5; PR90556target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"7target triple = "i686-pc-linux-gnu"8 9%struct.S0 = type { i32, [2 x i8], [2 x i8], [4 x i8] }10 11@g_98 = common global %struct.S0 zeroinitializer, align 412 13define void @foo() nounwind !dbg !5 {14; ASM: movzbl15; ASM-NOT: movzbl16; ASM: calll17entry:18  %tmp17 = load i8, ptr getelementptr inbounds (%struct.S0, ptr @g_98, i32 0, i32 1, i32 0), align 4, !dbg !1419  %tmp54 = zext i8 %tmp17 to i32, !dbg !1520  %foo = load i32, ptr getelementptr inbounds (%struct.S0, ptr @g_98, i32 0, i32 1, i32 0), align 4, !dbg !1621; MIR: renamable $edi = MOVZX32rr8 renamable $al, debug-location !1622  %conv.i = trunc i32 %foo to i8, !dbg !1723 24  tail call void @func_12(i32 %tmp54, i8 zeroext %conv.i) #0, !dbg !1825  call void @llvm.dbg.value(metadata i8 %tmp17, metadata !8, metadata !DIExpression()), !dbg !1426  call void @llvm.dbg.value(metadata i32 %tmp54, metadata !10, metadata !DIExpression()), !dbg !1527  call void @llvm.dbg.value(metadata i32 %foo, metadata !12, metadata !DIExpression()), !dbg !1628  call void @llvm.dbg.value(metadata i8 %conv.i, metadata !13, metadata !DIExpression()), !dbg !1729  ret void, !dbg !1930}31 32declare void @func_12(i32, i8 zeroext)33 34declare void @llvm.dbg.value(metadata, metadata, metadata)35 36!llvm.dbg.cu = !{!0}37!llvm.debugify = !{!3, !4}38 39!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)40!1 = !DIFile(filename: "/Users/vsk/src/llvm.org-main/llvm/test/CodeGen/X86/fold-zext-trunc.ll", directory: "/")41!2 = !{}42!3 = !{i32 6}43!4 = !{i32 4}44!5 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !7)45!6 = !DISubroutineType(types: !2)46!7 = !{!8, !10, !12, !13}47!8 = !DILocalVariable(name: "1", scope: !5, file: !1, line: 1, type: !9)48!9 = !DIBasicType(name: "ty8", size: 8, encoding: DW_ATE_unsigned)49!10 = !DILocalVariable(name: "2", scope: !5, file: !1, line: 2, type: !11)50!11 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)51!12 = !DILocalVariable(name: "3", scope: !5, file: !1, line: 3, type: !11)52!13 = !DILocalVariable(name: "4", scope: !5, file: !1, line: 4, type: !9)53!14 = !DILocation(line: 1, column: 1, scope: !5)54!15 = !DILocation(line: 2, column: 1, scope: !5)55!16 = !DILocation(line: 3, column: 1, scope: !5)56!17 = !DILocation(line: 4, column: 1, scope: !5)57!18 = !DILocation(line: 5, column: 1, scope: !5)58!19 = !DILocation(line: 6, column: 1, scope: !5)59!20 = !{i32 2, !"Debug Info Version", i32 3}60!llvm.module.flags = !{!20}61