41 lines · plain
1; RUN: opt -S -loop-reduce %s | FileCheck %s2 3;; We (currently?) can't salvage an IV if the offset is wider than 64 bits.4;; Check we poison it instead.5 6; CHECK: #dbg_value(i[[#]] poison, ![[#]], !DIExpression(), ![[#]])7 8define i16 @main() {9entry:10 br label %for.cond2911 12for.cond29: ; preds = %for.body32, %entry13 %il_1000.0 = phi i128 [ 0, %entry ], [ %inc72, %for.body32 ]14 %l_995.0 = phi i128 [ 4704496199548239085565, %entry ], [ %inc70, %for.body32 ]15 #dbg_value(i128 %l_995.0, !4, !DIExpression(), !9)16 %cmp30 = icmp slt i128 %il_1000.0, 017 br i1 %cmp30, label %for.body32, label %for.cond.cleanup3118 19for.cond.cleanup31: ; preds = %for.cond2920 ret i16 021 22for.body32: ; preds = %for.cond2923 %inc70 = add i128 %l_995.0, 124 %inc72 = add i128 %il_1000.0, 125 br label %for.cond2926}27 28!llvm.dbg.cu = !{!0}29!llvm.module.flags = !{!3}30 31!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, globals: !2, splitDebugInlining: false, nameTableKind: None)32!1 = !DIFile(filename: "foo.c", directory: "/tmp")33!2 = !{}34!3 = !{i32 2, !"Debug Info Version", i32 3}35!4 = !DILocalVariable(name: "l_995", scope: !5, file: !1, line: 414, type: !7)36!5 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 397, type: !6, scopeLine: 398, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)37!6 = !DISubroutineType(types: !2)38!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__uint128_t", file: !1, baseType: !8)39!8 = !DIBasicType(name: "unsigned __int128", size: 128, encoding: DW_ATE_unsigned)40!9 = !DILocation(line: 0, scope: !5)41