brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 78ecec9 Raw
78 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt -disable-output -S -passes=print-ir-similarity < %s 2>&1 | FileCheck %s3 4; When a debug instruction is the first instruction in a block, when that block5; has not been given a canonical numbering, since debug instructions are not6; counted in similarity matching they must be ignored when creating canonical7; relations from one region to another.  This checks that this is enforced.8 9; CHECK: 2 candidates of length 4.  Found in:10; CHECK-NEXT:   Function: main, Basic Block: entry11; CHECK-NEXT:     Start Instruction:   %0 = add i32 1, 412; CHECK-NEXT:       End Instruction:   %1 = sub i32 1, 413; CHECK-NEXT:   Function: main, Basic Block: for.body16914; CHECK-NEXT:     Start Instruction:   %2 = add i32 1, 415; CHECK-NEXT:       End Instruction:   %3 = sub i32 1, 416; CHECK-NEXT: 2 candidates of length 3.  Found in:17; CHECK-NEXT:   Function: main, Basic Block: entry18; CHECK-NEXT:     Start Instruction:   br label %for.body16919; CHECK-NEXT:       End Instruction:   %1 = sub i32 1, 420; CHECK-NEXT:   Function: main, Basic Block: for.body16921; CHECK-NEXT:     Start Instruction:   br label %for.end12222; CHECK-NEXT:       End Instruction:   %3 = sub i32 1, 423; CHECK-NEXT: 2 candidates of length 2.  Found in:24; CHECK-NEXT:   Function: main, Basic Block: for.end12225; CHECK-NEXT:     Start Instruction:   store i32 30, ptr undef, align 126; CHECK-NEXT:       End Instruction:   %1 = sub i32 1, 427; CHECK-NEXT:   Function: main, Basic Block: for.end24628; CHECK-NEXT:     Start Instruction:   store i32 0, ptr undef, align 129; CHECK-NEXT:       End Instruction:   %3 = sub i32 1, 430 31source_filename = "irsimilarity_crash.ll"32 33@v_13 = external dso_local global ptr, align 134 35; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn36declare void @llvm.dbg.declare(metadata, metadata, metadata) #037 38define dso_local i16 @main() {39entry:40  %0 = add i32 1, 441  br label %for.body16942 43for.end122:                                       ; preds = %for.cond10844  store i32 30, ptr undef, align 145  %1 = sub i32 1, 446  ret i16 147 48for.body169:                                      ; preds = %for.cond16749  %2 = add i32 1, 450  br label %for.end12251 52for.end246:                                     ; preds = %for.cond16753  call void @llvm.dbg.declare(metadata ptr undef, metadata !1, metadata !DIExpression()), !dbg !1154  store i32 0, ptr undef, align 155  %3 = sub i32 1, 456  unreachable57}58 59attributes #0 = { nocallback nofree nosync nounwind readnone speculatable willreturn }60 61!llvm.dbg.cu = !{}62!llvm.module.flags = !{!0}63 64!0 = !{i32 2, !"Debug Info Version", i32 3}65!1 = !DILocalVariable(name: "v_68", scope: !2, file: !3, line: 522, type: !10)66!2 = distinct !DILexicalBlock(scope: !4, file: !3, line: 522, column: 9)67!3 = !DIFile(filename: "41097217.c", directory: "rt.outdir")68!4 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 480, type: !5, scopeLine: 481, spFlags: DISPFlagDefinition, unit: !8, retainedNodes: !9)69!5 = !DISubroutineType(types: !6)70!6 = !{!7}71!7 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed)72!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 15.0.0.prerel", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !9, globals: !9, splitDebugInlining: false, nameTableKind: None)73!9 = !{}74!10 = !DIBasicType(name: "long", size: 32, encoding: DW_ATE_signed)75!11 = !DILocation(line: 522, column: 23, scope: !2)76;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:77; CHECK: {{.*}}78