llvm-project/llvm/lib
Craig Topper 6d0190f21c [X86] Don't consider functions ABI compatible for ArgumentPromotion pass if they view 512-bit vectors differently.
The use of the -mprefer-vector-width=256 command line option mixed with functions
using vector intrinsics can create situations where one function thinks 512 vectors
are legal, but another fucntion does not.

If a 512 bit vector is passed between them via a pointer, its possible ArgumentPromotion
might try to pass by value instead. This will result in type legalization for the two
functions handling the 512 bit vector differently leading to runtime failures.

Had the 512 bit vector been passed by value from clang codegen, both functions would
have been tagged with a min-legal-vector-width=512 function attribute. That would
make them be legalized the same way.

I observed this issue in 32-bit mode where a union containing a 512 bit vector was
being passed by a function that used intrinsics to one that did not. The caller
ended up passing in zmm0 and the callee tried to read it from ymm0 and ymm1.

The fix implemented here is just to consider it a mismatch if two functions
would handle 512 bit differently without looking at the types that are being
considered. This is the easist and safest fix, but it can be improved in the future.

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

llvm-svn: 354376
2019-02-19 20:12:20 +00:00
..
Analysis [BPI] Look through bitcasts in calcZeroHeuristic 2019-02-15 11:50:21 +00:00
AsmParser Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
BinaryFormat [WebAssembly] clang-tidy (NFC) 2019-02-04 19:13:39 +00:00
Bitcode Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
CodeGen [SDAG] Use shift amount type in MULO promotion; NFC 2019-02-19 17:37:55 +00:00
DebugInfo [symbolizer] Avoid collecting symbols belonging to invalid sections. 2019-02-14 23:50:35 +00:00
Demangle Add missing include (cstdlib) to Demangle.h 2019-01-22 19:18:18 +00:00
ExecutionEngine [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
FuzzMutate [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
Fuzzer
IR [LLVM-C] Add bindings to create enumerators 2019-02-17 21:25:47 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO [ThinLTO] Detect partially split modules during the thin link 2019-02-14 21:22:50 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MC [MC] Make SubtargetFeatureKV only store one FeatureBitset and use an 'unsigned' to hold the value. 2019-02-18 06:46:17 +00:00
MCA [MCA] Correctly update register definitions in the PRF after move elimination. 2019-02-18 14:15:25 +00:00
Object [libObject][NFC] Use sys::path::convert_to_slash. 2019-02-19 18:14:44 +00:00
ObjectYAML [yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values 2019-02-19 16:22:21 +00:00
OptRemarks Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
Option Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Passes [HotColdSplit] Schedule splitting late to fix perf regression 2019-02-15 18:46:44 +00:00
ProfileData [PGO] Use a function for creating variable for profile file name. NFC. 2019-02-05 22:34:45 +00:00
Support Annotate timeline in Instruments with passes and other timed regions. 2019-02-19 18:18:31 +00:00
TableGen [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
Target [X86] Don't consider functions ABI compatible for ArgumentPromotion pass if they view 512-bit vectors differently. 2019-02-19 20:12:20 +00:00
Testing Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TextAPI Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ToolDrivers [llvm-ar][libObject] Fix relative paths when nesting thin archives. 2019-02-13 23:39:41 +00:00
Transforms [NFC] API for signaling that the current loop is being deleted 2019-02-19 11:14:05 +00:00
WindowsManifest Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [llvm-mca] Move llvm-mca library to llvm/lib/MCA. 2018-12-17 08:08:31 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00