llvm-project/llvm/test/LTO/X86
Arthur Eubanks 2eade1dba4 [WPD] Use new llvm.public.type.test intrinsic for potentially publicly visible classes
Turning on opaque pointers has uncovered an issue with WPD where we currently pattern match away `assume(type.test)` in WPD so that a later LTT doesn't resolve the type test to undef and introduce an `assume(false)`. The pattern matching can fail in cases where we transform two `assume(type.test)`s into `assume(phi(type.test.1, type.test.2))`.

Currently we create `assume(type.test)` for all virtual calls that might be devirtualized. This is to support `-Wl,--lto-whole-program-visibility`.

To prevent this, all virtual calls that may not be in the same LTO module instead use a new `llvm.public.type.test` intrinsic in place of the `llvm.type.test`. Then when we know if `-Wl,--lto-whole-program-visibility` is passed or not, we can either replace all `llvm.public.type.test` with `llvm.type.test`, or replace all `llvm.public.type.test` with `true`. This prevents WPD from trying to pattern match away `assume(type.test)` for public virtual calls when failing the pattern matching will result in miscompiles.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D128955
2022-07-26 08:01:08 -07:00
..
Inputs LTO: Decide upfront whether to use opaque/non-opaque pointer types 2022-06-01 18:05:53 -07:00
attrs.ll
bcsection.ll
cfi_endproc.ll
cfi_jt_aliases.ll LTO: Decide upfront whether to use opaque/non-opaque pointer types 2022-06-01 18:05:53 -07:00
codemodel-1.ll
codemodel-2.ll
codemodel-3.ll
current-section.ll
diagnostic-handler-noexit.ll
diagnostic-handler-remarks-with-hotness.ll [Inline] Annotate inline pass name with link phase information for analysis. 2022-06-24 10:06:43 -07:00
diagnostic-handler-remarks.ll [LTO] Update remark test after 644a965c1e. 2022-07-04 15:21:15 +01:00
disable-verify.ll
dllimport.ll
embed-bitcode.ll
inline-asm-lto-discard.ll
inline-asm-lto-discard2.ll
internalize.ll
invalid.ll
keep-used-puts-during-instcombine.ll
libcall-overridden-via-alias.ll
linkonce_odr_func.ll
list-dependent-libraries.ll
list-symbols.ll
lit.local.cfg
llvm-lto-output.ll
mix-opaque-typed.ll LTO: Decide upfront whether to use opaque/non-opaque pointer types 2022-06-01 18:05:53 -07:00
no-undefined-puts-when-implemented.ll
objc-arc-contract.ll
objc-detection-i386.ll
objc-detection.ll
parallel.ll
pr25919.ll
pr38046.ll
print-macho-cpu.ll
private-symbol.ll
public-type-test.ll [WPD] Use new llvm.public.type.test intrinsic for potentially publicly visible classes 2022-07-26 08:01:08 -07:00
remangle_intrinsics.ll
remangle_intrinsics_tbaa.ll
restore-externals.ll
runtime-library.ll
set-merged.ll
stdcall.ll
strip-debug-info-no-call-loc.ll
strip-debug-info.ll
symver-asm.ll
symver-asm2.ll
symver-asm3.ll
tailcallelim.ll
tli-nobuiltin.ll
tli-sqrtf_finite.ll
triple-init.ll
triple-init2.ll
type-mapping-bug.ll
type-mapping-bug2.ll
type-mapping-bug3.ll
type-mapping-bug4.ll LTO: Decide upfront whether to use opaque/non-opaque pointer types 2022-06-01 18:05:53 -07:00
unnamed.ll