1 ; Test keeping one module flag
2 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=named-metadata --test=FileCheck --test-arg=--check-prefix=CHECK-INTERESTINGNESS0 --test-arg=%s --test-arg=--input-file %s -o %t.0
3 ; RUN: FileCheck --check-prefix=RESULT0 %s < %t.0
5 ; Test keeping two module flags
6 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=named-metadata --test=FileCheck --test-arg=--check-prefix=CHECK-INTERESTINGNESS1 --test-arg=%s --test-arg=--input-file %s -o %t.1
7 ; RUN: FileCheck --check-prefix=RESULT1 %s < %t.1
10 ; Test removing all module flags
11 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=named-metadata --test=FileCheck --test-arg=--check-prefix=CHECK-INTERESTINGNESS2 --test-arg=%s --test-arg=--input-file %s -o %t.2
12 ; RUN: FileCheck --check-prefix=RESULT2 %s < %t.2
15 ; CHECK-INTERESTINGNESS0: "openmp-device"
17 ; CHECK-INTERESTINGNESS1: "wchar_size"
18 ; CHECK-INTERESTINGNESS1: "openmp"
20 ; CHECK-INTERESTINGNESS2: !llvm.module.flags
22 ; RESULT0: !llvm.module.flags = !{!0}
23 ; RESULT0: !0 = !{i32 7, !"openmp-device", i32 50}
26 ; RESULT1: !llvm.module.flags = !{!0, !1}
27 ; RESULT1: !0 = !{i32 1, !"wchar_size", i32 4}
28 ; RESULT1: !1 = !{i32 7, !"openmp", i32 50}
31 ; RESULT2: !llvm.module.flags = !{}
33 !llvm.module.flags = !{!0, !1, !2, !3, !4}
35 !0 = !{i32 1, !"amdhsa_code_object_version", i32 400}
36 !1 = !{i32 1, !"wchar_size", i32 4}
37 !2 = !{i32 7, !"openmp", i32 50}
38 !3 = !{i32 7, !"openmp-device", i32 50}
39 !4 = !{i32 8, !"PIC Level", i32 1}