brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · eb0a14b Raw
111 lines · plain
1;; BB cluster sections error handling2;; Error handling for version 0:3; RUN: echo '!dummy1' > %t14; RUN: echo '!!1 4' >> %t15; RUN: echo '!!1' >> %t16; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t1 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR17; CHECK-ERROR1: LLVM ERROR: invalid profile {{.*}} at line 3: duplicate basic block id found '1'8; RUN: echo '!dummy1' > %t39; RUN: echo '!!-1' >> %t310; RUN: not --crash llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t3 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR311; CHECK-ERROR3: LLVM ERROR: invalid profile {{.*}} at line 2: unsigned integer expected: '-1'12; RUN: echo '!dummy1 /path/to/filename' > %t413; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t4 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR414; CHECK-ERROR4: LLVM ERROR: invalid profile {{.*}} at line 1: unknown string found: '/path/to/filename'15; RUN: echo '!dummy2 M=test_dir/test_file' > %t516; RUN: echo '!dummy2 M=test_dir/test_file' >> %t517; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t5 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR518; CHECK-ERROR5: LLVM ERROR: invalid profile {{.*}} at line 2: duplicate profile for function 'dummy2'19; RUN: echo '!dummy1 M=' > %t620; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t6 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR621; CHECK-ERROR6: LLVM ERROR: invalid profile {{.*}} at line 1: empty module name specifier22;;23;; Error handling for version 1:24; RUN: echo 'v2' > %t725; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t7 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR726; CHECK-ERROR7: LLVM ERROR: invalid profile {{.*}} at line 1: invalid profile version: 227; RUN: echo 'v1' > %t828; RUN: echo '!dummy1' >> %t829; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t8 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR830; CHECK-ERROR8: LLVM ERROR: invalid profile {{.*}} at line 2: invalid specifier: '!'31; RUN: echo 'v1' > %t932; RUN: echo 'm dummy1/module1 dummy1/module2' >> %t933; RUN: echo 'f dummy1' >> %t934; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t9 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR935; CHECK-ERROR9: LLVM ERROR: invalid profile {{.*}} at line 2: invalid module name value: 'dummy1/module1 dummy1/module2'36;;37;; Error handling for version 1, cloning paths.38; RUN: echo 'v1' > %t1039; RUN: echo 'f dummy1' >> %t1040; RUN: echo 'c 0 1.1.1' >> %t1041; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t10 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1042; CHECK-ERROR10: LLVM ERROR: invalid profile {{.*}} at line 3: unable to parse basic block id: '1.1.1'43; RUN: echo 'v1' > %t1144; RUN: echo 'f dummy1' >> %t1145; RUN: echo 'c 0 1.a' >> %t1146; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t11 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1147; CHECK-ERROR11: LLVM ERROR: invalid profile {{.*}} at line 3: unable to parse clone id: 'a'48; RUN: echo 'v1' > %t1249; RUN: echo 'f dummy1' >> %t1250; RUN: echo 'c 0 1' >> %t1251; RUN: echo 'p 1 2.1' >> %t1252; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t12 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1253; CHECK-ERROR12: LLVM ERROR: invalid profile {{.*}} at line 4: unsigned integer expected: '2.1'54; RUN: echo 'v1' > %t1355; RUN: echo 'f dummy1' >> %t1356; RUN: echo 'c 0 1' >> %t1357; RUN: echo 'p 1 2 3 2' >> %t1358; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t13 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1359; CHECK-ERROR13: LLVM ERROR: invalid profile {{.*}} at line 4: duplicate cloned block in path: '2'60; RUN: echo 'v1' > %t1461; RUN: echo 'f dummy1' >> %t1462; RUN: echo 'c 0 1' >> %t1463; RUN: echo 'g 0,1:2' >> %t1464; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t14 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1465; CHECK-ERROR14: LLVM ERROR: invalid profile {{.*}} at line 4: unsigned integer expected: ''66; RUN: echo 'v1' > %t1567; RUN: echo 'f dummy1' >> %t1568; RUN: echo 'c 0 1' >> %t1569; RUN: echo 'g 0:4,1:2:3' >> %t1570; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t15 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1571; CHECK-ERROR15: LLVM ERROR: invalid profile {{.*}} at line 4: unsigned integer expected: '2:3'72; RUN: echo 'v1' > %t1673; RUN: echo 'f dummy1' >> %t1674; RUN: echo 'c 0 1' >> %t1675; RUN: echo 'g 0:4,1:2' >> %t1676; RUN: echo 'h a:1111111111111111 1:ffffffffffffffff' >> %t1677; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t16 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1678; CHECK-ERROR16: LLVM ERROR: invalid profile {{.*}} at line 5: unsigned integer expected: 'a'79; RUN: echo 'v1' > %t1780; RUN: echo 'f dummy1' >> %t1781; RUN: echo 'c 0 1' >> %t1782; RUN: echo 'g 0:4,1:2' >> %t1783; RUN: echo 'h 0:111111111111111g 1:ffffffffffffffff' >> %t1784; RUN: not --crash llc < %s -O0 -mtriple=x86_64 -function-sections -basic-block-sections=%t17 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1785; CHECK-ERROR17: LLVM ERROR: invalid profile {{.*}} at line 5: unsigned integer expected in hex format: '111111111111111g'86 87 88define i32 @dummy1(i32 %x, i32 %y, i32 %z) {89  entry:90    %tmp = mul i32 %x, %y91    %tmp2 = add i32 %tmp, %z92    ret i32 %tmp293}94 95define i32 @dummy2(i32 %x, i32 %y, i32 %z) !dbg !4 {96  entry:97    %tmp = mul i32 %x, %y98    %tmp2 = add i32 %tmp, %z99    ret i32 %tmp2100}101 102!llvm.dbg.cu = !{!0}103!llvm.module.flags = !{!2, !3}104 105!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1)106!1 = !DIFile(filename: "test_dir/test_file", directory: "test_dir")107!2 = !{i32 7, !"Dwarf Version", i32 5}108!3 = !{i32 2, !"Debug Info Version", i32 3}109!4 = distinct !DISubprogram(name: "dummy1", scope: !1, unit: !0)110 111