llvm-project/llvm/test/LTO/X86
Daniel Berlin 3c1432fecf Implement intrinsic mangling for literal struct types.
Fixes PR 31921

Summary:
Predicateinfo requires an ugly workaround to try to avoid literal
struct types due to the intrinsic mangling not being implemented.
This workaround actually does not work in all cases (you can hit the
assert by bootstrapping with -print-predicateinfo), and can't be made
to work without DFS'ing the type (IE copying getMangledStr and using a
version that detects if it would crash).

Rather than do that, i just implemented the mangling.  It seems
simple, since they are unified structurally.

Looking at the overloaded-mangling testcase we have, it actually turns
out the gc intrinsics will *also* crash if you try to use a literal
struct.  Thus, the testcase added fails before this patch, and works
after, without needing to resort to predicateinfo.

Reviewers: chandlerc, davide

Subscribers: llvm-commits, sanjoy

Differential Revision: https://reviews.llvm.org/D29925

llvm-svn: 295253
2017-02-15 23:16:20 +00:00
..
Inputs Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
attrs.ll
bcsection.ll
cfi_endproc.ll IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
current-section.ll Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
diagnostic-handler-noexit.ll
diagnostic-handler-remarks-with-hotness.ll [LTO] Simplify this test quite a bit, @func2 is unused/unneeded. 2017-02-12 03:47:54 +00:00
diagnostic-handler-remarks.ll [tests] Be explicit about the files we want to remove. 2017-02-10 22:55:37 +00:00
disable-verify.ll Refactor the InternalizePass into a helper class, and expose it through a public free function (NFC) 2016-04-13 05:25:08 +00:00
invalid.ll Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
keep-used-puts-during-instcombine.ll
linkonce_odr_func.ll IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
list-symbols.ll
lit.local.cfg
llvm-lto-output.ll
no-undefined-puts-when-implemented.ll [LTO] Reject modules without datalayout. 2016-12-14 21:57:04 +00:00
objc-detection-i386.ll Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
objc-detection.ll Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
parallel.ll
pr25919.ll
private-symbol.ll
remangle_intrinsics.ll Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
remangle_intrinsics_tbaa.ll Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
restore-externals.ll
runtime-library.ll
set-merged.ll Revert r265817 2016-04-08 18:15:37 +00:00
stdcall.ll LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions(). 2016-10-12 20:12:19 +00:00
strip-debug-info.ll Allow the LTO code generator to strip invalid debug info from the input. 2016-05-09 19:57:15 +00:00
symver-asm.ll
triple-init.ll [LTO] Reject modules without datalayout. 2016-12-14 21:57:04 +00:00
type-mapping-bug.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
unnamed.ll LTO: Don't bother trying to mangle unnamed globals, as they can't be preserved with MustPreserveSymbols. 2016-04-27 23:48:11 +00:00