brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · eff7514 Raw
45 lines · plain
1; RUN: opt %s -passes='sroa,early-cse' -S | FileCheck %s2; CHECK: DIExpression(DW_OP_constu, 9223372036854775808, DW_OP_minus, DW_OP_stack_value)3; Created from the following C input (and then delta-reduced the IR):4;5; extern unsigned long long use(unsigned long long);6; void f(unsigned long long x) {7;   for (; x > 0; x --) {8;     unsigned long long y = x + 0x8000000000000000;9;     use(x);10;   }11; }12 13define void @f(i64 noundef %x) #0 !dbg !9 {14entry:15  %x.addr = alloca i64, align 816  %y = alloca i64, align 817  br label %for.cond18for.cond:                                         ; preds = %for.inc, %entry19  %0 = load i64, ptr %x.addr, align 820  call void @llvm.dbg.declare(metadata ptr %y, metadata !15, metadata !DIExpression())21, !dbg !2922  %1 = load i64, ptr %x.addr, align 823  %add = add i64 %1, -922337203685477580824  store i64 %add, ptr %y, align 825  br label %for.cond26}27declare void @llvm.dbg.declare(metadata, metadata, metadata) #128 29!llvm.module.flags = !{!3,!7}30 31!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None, sysroot: "/")32!1 = !DIFile(filename: "t.c", directory: "/")33!3 = !{i32 2, !"Debug Info Version", i32 3}34!7 = !{i32 7, !"frame-pointer", i32 2}35!9 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !10, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13)36!10 = !DISubroutineType(types: !11)37!11 = !{null, !12}38!12 = !DIBasicType(name: "unsigned long long", size: 64, encoding: DW_ATE_unsigned)39!13 = !{}40!15 = !DILocalVariable(name: "y", scope: !16, file: !1, line: 4, type: !12)41!16 = distinct !DILexicalBlock(scope: !17, file: !1, line: 3, column: 23)42!17 = distinct !DILexicalBlock(scope: !18, file: !1, line: 3, column: 3)43!18 = distinct !DILexicalBlock(scope: !9, file: !1, line: 3, column: 3)44!29 = !DILocation(line: 4, column: 24, scope: !16)45