From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- .../pgo-indirect-call-promotion/filecheck-patterns.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt (limited to 'tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt') diff --git a/tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt b/tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt new file mode 100644 index 000000000..e19c78350 --- /dev/null +++ b/tests/run-make/pgo-indirect-call-promotion/filecheck-patterns.txt @@ -0,0 +1,16 @@ +CHECK: define void @call_a_bunch_of_functions({{.*}} { + +# Make sure that indirect call promotion inserted a check against the most +# frequently called function. +CHECK: %{{.*}} = icmp eq {{void \(\)\*|ptr}} %{{.*}}, @function_called_always + +# Check that the call to `function_called_always` was inlined, so that we +# directly call `opaque_f1` from the upstream crate. +CHECK: call void @opaque_f1() + + +# Same checks as above, repeated for the trait object case + +CHECK: define void @call_a_bunch_of_trait_methods({{.*}} +CHECK: %{{.*}} = icmp eq {{void \(\{\}\*\)\*|ptr}} %{{.*}}, {{.*}}@foo +CHECK: tail call void @opaque_f2() -- cgit v1.2.3