[clang] [llvm] [WPD] Enable speculative devirtualization with LTO (PR #233380)

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 08:49:45 PDT 2026


================
@@ -0,0 +1,68 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -S -passes=wholeprogramdevirt -wholeprogramdevirt-check=fallback -whole-program-visibility -pass-remarks=wholeprogramdevirt %s 2>&1 | FileCheck %s
+
+; Check whether the type.test intrinsic is removed after devirtualization when
+; the fallback mode is used for WPD.
+
----------------
KRM7 wrote:

It's not directly related to changes and this is just testing the current behaviour, but I think it's interesting to check what happens to the `type.test` calls with both the fallback mode and speculative devirtualization (in `speculative-devirt-cfi.ll`), because the indirect call is kept in both cases.

https://github.com/llvm/llvm-project/pull/233380


More information about the cfe-commits mailing list