Skip to content

Commit 057837a

Browse files
committed
Reland #184065
1 parent fdd3e7c commit 057837a

123 files changed

Lines changed: 850 additions & 415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

clang/lib/CodeGen/CGCUDANV.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "llvm/IR/BasicBlock.h"
2626
#include "llvm/IR/Constants.h"
2727
#include "llvm/IR/DerivedTypes.h"
28+
#include "llvm/IR/GlobalValue.h"
2829
#include "llvm/IR/ReplaceConstant.h"
2930
#include "llvm/Support/Format.h"
3031
#include "llvm/Support/VirtualFileSystem.h"
@@ -975,7 +976,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() {
975976
// Generate a unique module ID.
976977
SmallString<64> ModuleID;
977978
llvm::raw_svector_ostream OS(ModuleID);
978-
OS << ModuleIDPrefix << llvm::format("%" PRIx64, FatbinWrapper->getGUID());
979+
OS << ModuleIDPrefix
980+
<< llvm::format("%" PRIx64,
981+
llvm::GlobalValue::getGUIDAssumingExternalLinkage(
982+
FatbinWrapper->getName()));
979983
llvm::Constant *ModuleIDConstant = makeConstantArray(
980984
std::string(ModuleID), "", ModuleIDSectionName, 32, /*AddNull=*/true);
981985

clang/test/CodeGen/cfi-icall-trap-recover-runtime.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@
1515

1616

1717
// TRAP-LABEL: define hidden void @f(
18-
// TRAP-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
18+
// TRAP-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
1919
// TRAP-NEXT: [[ENTRY:.*:]]
2020
// TRAP-NEXT: ret void
2121
//
2222
// ABORT-LABEL: define hidden void @f(
23-
// ABORT-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
23+
// ABORT-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
2424
// ABORT-NEXT: [[ENTRY:.*:]]
2525
// ABORT-NEXT: ret void
2626
//
2727
// RECOVER-LABEL: define hidden void @f(
28-
// RECOVER-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
28+
// RECOVER-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
2929
// RECOVER-NEXT: [[ENTRY:.*:]]
3030
// RECOVER-NEXT: ret void
3131
//
3232
// ABORT_MIN-LABEL: define hidden void @f(
33-
// ABORT_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
33+
// ABORT_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
3434
// ABORT_MIN-NEXT: [[ENTRY:.*:]]
3535
// ABORT_MIN-NEXT: ret void
3636
//
3737
// RECOVER_MIN-LABEL: define hidden void @f(
38-
// RECOVER_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
38+
// RECOVER_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
3939
// RECOVER_MIN-NEXT: [[ENTRY:.*:]]
4040
// RECOVER_MIN-NEXT: ret void
4141
//
4242
// PRESERVE_MIN-LABEL: define hidden void @f(
43-
// PRESERVE_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]] {
43+
// PRESERVE_MIN-SAME: ) #[[ATTR0:[0-9]+]] !type [[META6:![0-9]+]] !type [[META7:![0-9]+]]
4444
// PRESERVE_MIN-NEXT: [[ENTRY:.*:]]
4545
// PRESERVE_MIN-NEXT: ret void
4646
//
@@ -50,7 +50,7 @@ void f() {
5050
void xf();
5151

5252
// TRAP-LABEL: define hidden void @g(
53-
// TRAP-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
53+
// TRAP-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
5454
// TRAP-NEXT: [[ENTRY:.*:]]
5555
// TRAP-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
5656
// TRAP-NEXT: [[FP:%.*]] = alloca ptr, align 8
@@ -71,7 +71,7 @@ void xf();
7171
// TRAP-NEXT: ret void
7272
//
7373
// ABORT-LABEL: define hidden void @g(
74-
// ABORT-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
74+
// ABORT-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
7575
// ABORT-NEXT: [[ENTRY:.*:]]
7676
// ABORT-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
7777
// ABORT-NEXT: [[FP:%.*]] = alloca ptr, align 8
@@ -93,7 +93,7 @@ void xf();
9393
// ABORT-NEXT: ret void
9494
//
9595
// RECOVER-LABEL: define hidden void @g(
96-
// RECOVER-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
96+
// RECOVER-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
9797
// RECOVER-NEXT: [[ENTRY:.*:]]
9898
// RECOVER-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
9999
// RECOVER-NEXT: [[FP:%.*]] = alloca ptr, align 8
@@ -115,7 +115,7 @@ void xf();
115115
// RECOVER-NEXT: ret void
116116
//
117117
// ABORT_MIN-LABEL: define hidden void @g(
118-
// ABORT_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
118+
// ABORT_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
119119
// ABORT_MIN-NEXT: [[ENTRY:.*:]]
120120
// ABORT_MIN-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
121121
// ABORT_MIN-NEXT: [[FP:%.*]] = alloca ptr, align 8
@@ -136,7 +136,7 @@ void xf();
136136
// ABORT_MIN-NEXT: ret void
137137
//
138138
// RECOVER_MIN-LABEL: define hidden void @g(
139-
// RECOVER_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
139+
// RECOVER_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
140140
// RECOVER_MIN-NEXT: [[ENTRY:.*:]]
141141
// RECOVER_MIN-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
142142
// RECOVER_MIN-NEXT: [[FP:%.*]] = alloca ptr, align 8
@@ -157,7 +157,7 @@ void xf();
157157
// RECOVER_MIN-NEXT: ret void
158158
//
159159
// PRESERVE_MIN-LABEL: define hidden void @g(
160-
// PRESERVE_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]] {
160+
// PRESERVE_MIN-SAME: i32 noundef [[B:%.*]]) #[[ATTR0]] !type [[META8:![0-9]+]] !type [[META9:![0-9]+]]
161161
// PRESERVE_MIN-NEXT: [[ENTRY:.*:]]
162162
// PRESERVE_MIN-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
163163
// PRESERVE_MIN-NEXT: [[FP:%.*]] = alloca ptr, align 8

clang/test/CodeGen/lto-newpm-pipeline.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
// CHECK-FULL-O0-NEXT: Running pass: CoroConditionalWrapper
3535
// CHECK-FULL-O0-NEXT: Running pass: CanonicalizeAliasesPass
3636
// CHECK-FULL-O0-NEXT: Running pass: NameAnonGlobalPass
37+
// CHECK-FULL-O0-NEXT: Running pass: AssignGUIDPass
3738
// CHECK-FULL-O0-NEXT: Running pass: AnnotationRemarksPass
3839
// CHECK-FULL-O0-NEXT: Running analysis: TargetLibraryAnalysis
3940
// CHECK-FULL-O0-NEXT: Running pass: VerifierPass
@@ -48,6 +49,7 @@
4849
// CHECK-THIN-O0-NEXT: Running pass: CoroConditionalWrapper
4950
// CHECK-THIN-O0-NEXT: Running pass: CanonicalizeAliasesPass
5051
// CHECK-THIN-O0-NEXT: Running pass: NameAnonGlobalPass
52+
// CHECK-THIN-O0-NEXT: Running pass: AssignGUIDPass
5153
// CHECK-THIN-O0-NEXT: Running pass: AnnotationRemarksPass
5254
// CHECK-THIN-O0-NEXT: Running analysis: TargetLibraryAnalysis
5355
// CHECK-THIN-O0-NEXT: Running pass: VerifierPass
@@ -64,6 +66,7 @@
6466
// CHECK-THIN-OPTIMIZED-NOT: Running pass: LoopVectorizePass
6567
// CHECK-THIN-OPTIMIZED: Running pass: CanonicalizeAliasesPass
6668
// CHECK-THIN-OPTIMIZED: Running pass: NameAnonGlobalPass
69+
// CHECK-THIN-OPTIMIZED: Running pass: AssignGUIDPass
6770
// CHECK-THIN-OPTIMIZED: Running pass: ThinLTOBitcodeWriterPass
6871

6972
void Foo(void) {}

clang/test/CodeGenCXX/cfi-vcall-trap-recover-runtime.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct S1 {
1919
};
2020

2121
// TRAP-LABEL: define hidden void @_Z3s1fP2S1(
22-
// TRAP-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
22+
// TRAP-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
2323
// TRAP-NEXT: [[ENTRY:.*:]]
2424
// TRAP-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
2525
// TRAP-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8
@@ -37,7 +37,7 @@ struct S1 {
3737
// TRAP-NEXT: ret void
3838
//
3939
// ABORT-LABEL: define hidden void @_Z3s1fP2S1(
40-
// ABORT-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
40+
// ABORT-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
4141
// ABORT-NEXT: [[ENTRY:.*:]]
4242
// ABORT-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
4343
// ABORT-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8
@@ -58,7 +58,7 @@ struct S1 {
5858
// ABORT-NEXT: ret void
5959
//
6060
// RECOVER-LABEL: define hidden void @_Z3s1fP2S1(
61-
// RECOVER-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
61+
// RECOVER-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
6262
// RECOVER-NEXT: [[ENTRY:.*:]]
6363
// RECOVER-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
6464
// RECOVER-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8
@@ -79,7 +79,7 @@ struct S1 {
7979
// RECOVER-NEXT: ret void
8080
//
8181
// ABORT_MIN-LABEL: define hidden void @_Z3s1fP2S1(
82-
// ABORT_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
82+
// ABORT_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
8383
// ABORT_MIN-NEXT: [[ENTRY:.*:]]
8484
// ABORT_MIN-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
8585
// ABORT_MIN-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8
@@ -98,7 +98,7 @@ struct S1 {
9898
// ABORT_MIN-NEXT: ret void
9999
//
100100
// RECOVER_MIN-LABEL: define hidden void @_Z3s1fP2S1(
101-
// RECOVER_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
101+
// RECOVER_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
102102
// RECOVER_MIN-NEXT: [[ENTRY:.*:]]
103103
// RECOVER_MIN-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
104104
// RECOVER_MIN-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8
@@ -117,7 +117,7 @@ struct S1 {
117117
// RECOVER_MIN-NEXT: ret void
118118
//
119119
// PRESERVE_MIN-LABEL: define hidden void @_Z3s1fP2S1(
120-
// PRESERVE_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]] {
120+
// PRESERVE_MIN-SAME: ptr noundef [[S1:%.*]]) #[[ATTR0:[0-9]+]]
121121
// PRESERVE_MIN-NEXT: [[ENTRY:.*:]]
122122
// PRESERVE_MIN-NEXT: [[S1_ADDR:%.*]] = alloca ptr, align 8
123123
// PRESERVE_MIN-NEXT: store ptr [[S1]], ptr [[S1_ADDR]], align 8

compiler-rt/test/cfi/icall/wrong-signature-mixed-lto.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,28 @@
22
// calling module has an incorrect declaration. Test a mix of lto types.
33
//
44
// -flto below overrides -flto=thin in %clang_cfi
5-
// RUN: %clang_cfi %s -DMODULE_A -c -o %t1_a.o
6-
// RUN: %clang_cfi %s -DMODULE_B -c -o %t1_b.o -flto
5+
// RUN: rm -rf %t
6+
// RUN: split-file %s %t
7+
// RUN: %clang_cfi %t/a.c -c -o %t1_a.o
8+
// RUN: %clang_cfi %t/b.c -c -o %t1_b.o -flto
79
// RUN: %clang_cfi %t1_a.o %t1_b.o -o %t1
810
// RUN: %expect_crash %t1 2>&1 | FileCheck --check-prefix=CFI %s
911
//
10-
// RUN: %clang_cfi %s -DMODULE_A -c -o %t2_a.o -flto
11-
// RUN: %clang_cfi %s -DMODULE_B -c -o %t2_b.o
12+
// RUN: %clang_cfi %t/a.c -c -o %t2_a.o -flto
13+
// RUN: %clang_cfi %t/b.c -c -o %t2_b.o
1214
// RUN: %clang_cfi %t2_a.o %t2_b.o -o %t2
1315
// RUN: %expect_crash %t2 2>&1 | FileCheck --check-prefix=CFI %s
1416
//
15-
// RUN: %clang_cfi %s -DMODULE_A -c -o %t3_a.o
16-
// RUN: %clang_cfi %s -DMODULE_B -c -o %t3_b.o
17+
// RUN: %clang_cfi %t/a.c -c -o %t3_a.o
18+
// RUN: %clang_cfi %t/b.c -c -o %t3_b.o
1719
// RUN: %clang_cfi %t3_a.o %t3_b.o -o %t3
1820
// RUN: %expect_crash %t3 2>&1 | FileCheck --check-prefix=CFI %s
1921
//
2022
// REQUIRES: thinlto
2123

24+
//--- a.c
2225
#include <stdio.h>
2326

24-
#if defined(MODULE_B)
25-
int f() {
26-
return 42;
27-
}
28-
#elif defined(MODULE_A)
2927
void f();
3028

3129
int main() {
@@ -38,4 +36,6 @@ int main() {
3836
// CFI-NOT: 2
3937
fprintf(stderr, "2\n");
4038
}
41-
#endif
39+
40+
//--- b.c
41+
int f() { return 42; }

lld/test/ELF/lto/devirt_vcall_vis_export_dynamic.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
;; Index based WPD
77
;; Generate unsplit module with summary for ThinLTO index-based WPD.
8-
; RUN: opt --thinlto-bc -o %t2.o %s
8+
; RUN: opt --passes=assign-guid --thinlto-bc -o %t2.o %s
99
; RUN: ld.lld %t2.o -o %t3 -save-temps --lto-whole-program-visibility \
1010
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
1111
; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
@@ -16,13 +16,13 @@
1616

1717
;; Hybrid WPD
1818
;; Generate split module with summary for hybrid Thin/Regular LTO WPD.
19-
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t.o %s
19+
; RUN: opt --passes=assign-guid --thinlto-bc --thinlto-split-lto-unit -o %t.o %s
2020
; RUN: ld.lld %t.o -o %t3 -save-temps --lto-whole-program-visibility \
2121
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
2222
; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
2323

2424
;; Regular LTO WPD
25-
; RUN: opt -o %t4.o %s
25+
; RUN: opt --passes=assign-guid -o %t4.o %s
2626
; RUN: ld.lld %t4.o -o %t3 -save-temps --lto-whole-program-visibility \
2727
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
2828
; RUN: llvm-dis %t3.0.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
@@ -107,19 +107,19 @@
107107
;; preemption, even without any options.
108108

109109
;; Index based WPD
110-
; RUN: opt -relocation-model=pic --thinlto-bc -o %t5.o %s
110+
; RUN: opt --passes=assign-guid -relocation-model=pic --thinlto-bc -o %t5.o %s
111111
; RUN: ld.lld %t5.o -o %t5.so -shared
112112
; RUN: ld.lld %t5.o %t5.so -o %t5 -save-temps --lto-whole-program-visibility \
113113
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck /dev/null --implicit-check-not single-impl --allow-empty
114114

115115
;; Hybrid WPD
116-
; RUN: opt -relocation-model=pic --thinlto-bc --thinlto-split-lto-unit -o %t5.o %s
116+
; RUN: opt --passes=assign-guid -relocation-model=pic --thinlto-bc --thinlto-split-lto-unit -o %t5.o %s
117117
; RUN: ld.lld %t5.o -o %t5.so -shared
118118
; RUN: ld.lld %t5.o %t5.so -o %t5 -save-temps --lto-whole-program-visibility \
119119
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck /dev/null --implicit-check-not single-impl --allow-empty
120120

121121
;; Regular LTO WPD
122-
; RUN: opt -relocation-model=pic -o %t5.o %s
122+
; RUN: opt --passes=assign-guid -relocation-model=pic -o %t5.o %s
123123
; RUN: ld.lld %t5.o -o %t5.so -shared
124124
; RUN: ld.lld %t5.o %t5.so -o %t5 -save-temps --lto-whole-program-visibility \
125125
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck /dev/null --implicit-check-not single-impl --allow-empty

lld/test/ELF/lto/devirt_vcall_vis_public.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33

44
;; Index based WPD
55
;; Generate unsplit module with summary for ThinLTO index-based WPD.
6-
; RUN: opt --thinlto-bc -o %t2.o %s
6+
; RUN: opt --passes=assign-guid --thinlto-bc -o %t2.o %s
77
; RUN: ld.lld %t2.o -o %t3 -save-temps --lto-whole-program-visibility \
88
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
99
; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
1010

1111
;; Hybrid WPD
1212
;; Generate split module with summary for hybrid Thin/Regular LTO WPD.
13-
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t.o %s
13+
; RUN: opt --passes=assign-guid --thinlto-bc --thinlto-split-lto-unit -o %t.o %s
1414
; RUN: ld.lld %t.o -o %t3 -save-temps --lto-whole-program-visibility \
1515
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
1616
; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
1717

1818
;; Regular LTO WPD
19-
; RUN: opt -o %t4.o %s
19+
; RUN: opt --passes=assign-guid -o %t4.o %s
2020
; RUN: ld.lld %t4.o -o %t3 -save-temps --lto-whole-program-visibility \
2121
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
2222
; RUN: llvm-dis %t3.0.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR

lld/test/ELF/lto/devirt_vcall_vis_shared_def.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66

77
;; Index based WPD
88
;; Generate unsplit module with summary for ThinLTO index-based WPD.
9-
; RUN: opt --thinlto-bc -o %t1a.o %s
10-
; RUN: opt --thinlto-bc -o %t2a.o %S/Inputs/devirt_vcall_vis_shared_def.ll
9+
; RUN: opt --passes=assign-guid --thinlto-bc -o %t1a.o %s
10+
; RUN: opt --passes=assign-guid --thinlto-bc -o %t2a.o %S/Inputs/devirt_vcall_vis_shared_def.ll
1111
; RUN: ld.lld %t1a.o %t2a.o -o %t3a -save-temps --lto-whole-program-visibility \
1212
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
1313
; RUN: llvm-dis %t1a.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
1414

1515
;; Hybrid WPD
1616
;; Generate split module with summary for hybrid Thin/Regular LTO WPD.
17-
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t1b.o %s
18-
; RUN: opt --thinlto-bc --thinlto-split-lto-unit -o %t2b.o %S/Inputs/devirt_vcall_vis_shared_def.ll
17+
; RUN: opt --passes=assign-guid --thinlto-bc --thinlto-split-lto-unit -o %t1b.o %s
18+
; RUN: opt --passes=assign-guid --thinlto-bc --thinlto-split-lto-unit -o %t2b.o %S/Inputs/devirt_vcall_vis_shared_def.ll
1919
; RUN: ld.lld %t1b.o %t2b.o -o %t3b -save-temps --lto-whole-program-visibility \
2020
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
2121
; RUN: llvm-dis %t1b.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
2222

2323
;; Regular LTO WPD
24-
; RUN: opt -o %t1c.o %s
25-
; RUN: opt -o %t2c.o %S/Inputs/devirt_vcall_vis_shared_def.ll
24+
; RUN: opt --passes=assign-guid -o %t1c.o %s
25+
; RUN: opt --passes=assign-guid -o %t2c.o %S/Inputs/devirt_vcall_vis_shared_def.ll
2626
; RUN: ld.lld %t1c.o %t2c.o -o %t3c -save-temps --lto-whole-program-visibility \
2727
; RUN: -mllvm -pass-remarks=. 2>&1 | FileCheck %s --check-prefix=REMARK
2828
; RUN: llvm-dis %t3c.0.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR

0 commit comments

Comments
 (0)