1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=named-metadata --test=FileCheck --test-arg=--check-prefix=CHECK-INTERESTINGNESS --test-arg=%s --test-arg=--input-file %s -o %t
2 ; RUN: FileCheck --check-prefix=RESULT %s < %t
3 ; Test the various named metadata recognized for simple list behavior.
5 ; CHECK-INTERESTINGNESS: !llvm.ident = !{![[LLVM_IDENT:[0-9]+]]
6 ; CHECK-INTERESTINGNESS: !opencl.spir.version = !{{{.*}}![[SPIR_VERSION:[0-9]+]]}
7 ; CHECK-INTERESTINGNESS: !opencl.ocl.version = !{{{.*}}![[OCL_VERSION:[0-9]+]]}
8 ; CHECK-INTERESTINGNESS: !opencl.used.extensions = !{{{.*}}![[OCL_EXTENSION:[0-9]+]]}
9 ; CHECK-INTERESTINGNESS: !opencl.used.optional.core.features = !{{{.*}}![[OCL_OPTIONAL_CORE_FEATURE:[0-9]+]]}
10 ; CHECK-INTERESTINGNESS: !opencl.compiler.options = !{{{.*}}![[OCL_COMPILER_OPTIONS:[0-9]+]]}
12 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[LLVM_IDENT]] = !{!"some llvm version 0"}
13 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[SPIR_VERSION]] = !{!"some spir version 1"}
14 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[OCL_VERSION]] = !{!"some ocl version 1"}
15 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[OCL_EXTENSION]] = !{!"some ocl extension 1"}
16 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[OCL_OPTIONAL_CORE_FEATURE]] = !{!"some ocl optional core feature 1"}
17 ; CHECK-DAG: CHECK-INTERESTINGNESS: ![[OCL_COMPILER_OPTIONS]] = !{!"some ocl compiler option 1"}
20 ; RESULT: !llvm.ident = !{![[LLVM_IDENT:[0-9]+]]
21 ; RESULT: !opencl.spir.version = !{![[SPIR_VERSION:[0-9]+]]}
22 ; RESULT: !opencl.ocl.version = !{![[OCL_VERSION:[0-9]+]]}
23 ; RESULT: !opencl.used.extensions = !{![[OCL_EXTENSION:[0-9]+]]}
24 ; RESULT: !opencl.used.optional.core.features = !{![[OCL_OPTIONAL_CORE_FEATURE:[0-9]+]]}
25 ; RESULT: !opencl.compiler.options = !{![[OCL_COMPILER_OPTION:[0-9]+]]}
26 ; RESULT: !some.unknown.named = !{![[UNKNOWN_0:[0-9]+]], ![[UNKNOWN_1:[0-9]+]]}
29 ; RESULT: ![[LLVM_IDENT]] = !{!"some llvm version 0"}
30 ; RESULT: ![[SPIR_VERSION]] = !{!"some spir version 1"}
31 ; RESULT: ![[OCL_VERSION]] = !{!"some ocl version 1"}
32 ; RESULT: ![[OCL_EXTENSION]] = !{!"some ocl extension 1"}
33 ; RESULT: ![[OCL_OPTIONAL_CORE_FEATURE]] = !{!"some ocl optional core feature 1"}
34 ; RESULT: ![[OCL_COMPILER_OPTION]] = !{!"some ocl compiler option 1"}
35 ; RESULT: ![[UNKNOWN_0]] = !{!"some unknown option 0"}
36 ; RESULT: ![[UNKNOWN_1]] = !{!"some unknown option 1"}
38 !llvm.ident = !{!0, !1, !0}
39 !opencl.spir.version = !{!2, !3}
40 !opencl.ocl.version = !{!4, !5}
41 !opencl.used.extensions = !{!6, !7}
42 !opencl.used.optional.core.features = !{!8, !9}
43 !opencl.compiler.options = !{!10, !11}
44 !some.unknown.named = !{!12, !13}
46 !0 = !{!"some llvm version 0"}
47 !1 = !{!"some llvm version 1"}
48 !2 = !{!"some spir version 0"}
49 !3 = !{!"some spir version 1"}
50 !4 = !{!"some ocl version 0"}
51 !5 = !{!"some ocl version 1"}
52 !6 = !{!"some ocl extension 0"}
53 !7 = !{!"some ocl extension 1"}
54 !8 = !{!"some ocl optional core feature 0"}
55 !9 = !{!"some ocl optional core feature 1"}
56 !10 = !{!"some ocl compiler option 0"}
57 !11 = !{!"some ocl compiler option 1"}
58 !12 = !{!"some unknown option 0"}
59 !13 = !{!"some unknown option 1"}