brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 4660315 Raw
81 lines · plain
1; RUN: llc %s -o - -print-after=machine-cse -mtriple=x86_64-- 2>&1 | FileCheck %s --match-full-lines2 3; CHECK: %5:gr32 = SUB32ri %0:gr32(tied-def 0), 1, implicit-def $eflags, debug-location !24; a.c:3:134; CHECK-NEXT: %10:gr32 = MOVSX32rr8 %4:gr85; CHECK-NEXT: JCC_1 %bb.2, 15, implicit $eflags, debug-location !25; a.c:3:186 7target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"8target triple = "x86_64-apple-macosx10.15.0"9 10@a = dso_local local_unnamed_addr global i32 0, align 4, !dbg !011 12; Function Attrs: norecurse nounwind readonly ssp uwtable13define dso_local i32 @b(i8 signext %0) local_unnamed_addr #0 !dbg !12 {14  call void @llvm.dbg.value(metadata i8 %0, metadata !17, metadata !DIExpression()), !dbg !1815  %2 = load i32, ptr @a, align 4, !dbg !19, !tbaa !2016  %3 = icmp sgt i32 %2, 1, !dbg !2417  br i1 %3, label %8, label %4, !dbg !2518 194:                                                ; preds = %120  %5 = sext i8 %0 to i32, !dbg !2621  %6 = ashr i32 %5, %2, !dbg !2722  %7 = icmp eq i32 %6, 0, !dbg !2723  br i1 %7, label %10, label %8, !dbg !2824 258:                                                ; preds = %4, %126  %9 = sext i8 %0 to i32, !dbg !2927  br label %10, !dbg !2828 2910:                                               ; preds = %4, %830  %11 = phi i32 [ %9, %8 ], [ 0, %4 ], !dbg !2831  ret i32 %11, !dbg !3032}33 34define dso_local i32 @main() local_unnamed_addr #0 !dbg !31 {35  %1 = call i32 @b(i8 signext 0), !dbg !3436  ret i32 %1, !dbg !3537}38 39declare void @llvm.dbg.value(metadata, metadata, metadata) #140 41!llvm.dbg.cu = !{!2}42!llvm.module.flags = !{!7, !8, !9, !10}43!llvm.ident = !{!11}44 45!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())46!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)47!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 11.0.0 (https://github.com/llvm/llvm-project 75cfd382201978615cca1c91c2d9f14f8b7af56d)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None, sysroot: "/")48!3 = !DIFile(filename: "a.c", directory: "/Users/davide/work/build/bin")49!4 = !{}50!5 = !{!0}51!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)52!7 = !{i32 7, !"Dwarf Version", i32 4}53!8 = !{i32 2, !"Debug Info Version", i32 3}54!9 = !{i32 1, !"wchar_size", i32 4}55!10 = !{i32 7, !"PIC Level", i32 2}56!11 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project 75cfd382201978615cca1c91c2d9f14f8b7af56d)"}57!12 = distinct !DISubprogram(name: "b", scope: !3, file: !3, line: 2, type: !13, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !16)58!13 = !DISubroutineType(types: !14)59!14 = !{!6, !15}60!15 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)61!16 = !{!17}62!17 = !DILocalVariable(name: "c", arg: 1, scope: !12, file: !3, line: 2, type: !15)63!18 = !DILocation(line: 0, scope: !12)64!19 = !DILocation(line: 3, column: 11, scope: !12)65!20 = !{!21, !21, i64 0}66!21 = !{!"int", !22, i64 0}67!22 = !{!"omnipotent char", !23, i64 0}68!23 = !{!"Simple C/C++ TBAA"}69!24 = !DILocation(line: 3, column: 13, scope: !12)70!25 = !DILocation(line: 3, column: 18, scope: !12)71!26 = !DILocation(line: 3, column: 21, scope: !12)72!27 = !DILocation(line: 3, column: 23, scope: !12)73!28 = !DILocation(line: 3, column: 10, scope: !12)74!29 = !DILocation(line: 4, column: 16, scope: !12)75!30 = !DILocation(line: 3, column: 3, scope: !12)76!31 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 8, type: !32, scopeLine: 9, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !4)77!32 = !DISubroutineType(types: !33)78!33 = !{!6}79!34 = !DILocation(line: 10, column: 10, scope: !31)80!35 = !DILocation(line: 10, column: 3, scope: !31)81