Skip to content

Commit b56fd78

Browse files
committed
[nfc] Make function-specialization3.ll test compatible with profile propagation unittests
The build configuration described in https://discourse.llvm.org/t/rfc-profile-information-propagation-unittesting/73595/11 causes this test to fail because that build configuration injects profile metadata which show up in the output. To fix this we just change the assertion to tolerate the presence of profile metadata. Tracking issue: #147390
1 parent e6aefbe commit b56fd78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/test/Transforms/FunctionSpecialization/function-specialization3.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ return:
3434

3535
; FORCE-NOT: define internal i32 @foo(
3636
;
37-
; FORCE: define internal i32 @foo.specialized.1(i32 %x, ptr %b) {
37+
; FORCE: define internal i32 @foo.specialized.1(i32 %x, ptr %b) {{(!prof !0 )?}}{
3838
; FORCE-NEXT: entry:
3939
; FORCE-NEXT: %0 = load i32, ptr @A, align 4
4040
; FORCE-NEXT: %add = add nsw i32 %x, %0
4141
; FORCE-NEXT: ret i32 %add
4242
; FORCE-NEXT: }
4343
;
44-
; FORCE: define internal i32 @foo.specialized.2(i32 %x, ptr %b) {
44+
; FORCE: define internal i32 @foo.specialized.2(i32 %x, ptr %b) {{(!prof !0 )?}}{
4545
; FORCE-NEXT: entry:
4646
; FORCE-NEXT: %0 = load i32, ptr @B, align 4
4747
; FORCE-NEXT: %add = add nsw i32 %x, %0

0 commit comments

Comments
 (0)