llvm-project/clang/test
Reid Kleckner 8e780252a7 [X86] ABI compat bugfix for MSVC vectorcall
Summary:
Before this change, X86_32ABIInfo::classifyArgument would be called
twice on vector arguments to vectorcall functions. This function has
side effects to track GPR register usage, and this would lead to
incorrect GPR usage in some cases.  The specific case I noticed is from
running out of XMM registers with mixed FP and vector arguments and no
aggregates of any kind. Consider this prototype:

  void __vectorcall vectorcall_indirect_vec(
      double xmm0, double xmm1, double xmm2, double xmm3, double xmm4,
      __m128 xmm5,
      __m128 ecx,
      int edx,
      __m128 mem);

classifyArgument has no effects when called on a plain FP type, but when
called on a vector type, it modifies FreeRegs to model GPR consumption.
However, this should not happen during the vector call first pass.

I refactored the code to unify vectorcall HVA logic with regcall HVA
logic. The conventions pass HVAs in registers differently (expanded vs.
not expanded), but if they do not fit in registers, they both pass them
indirectly by address.

Reviewers: erichkeane, craig.topper

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72110
2020-01-14 17:49:13 -08:00
..
ARCMT
AST Disallow an empty string literal in an asm label 2020-01-08 08:38:02 -05:00
ASTMerge
Analysis [analyzer] Fix SARIF column locations 2020-01-14 15:38:30 -05:00
CXX CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
ClangScanDeps Revert "[clang][clang-scan-deps] Aggregate the full dependency information." 2019-12-11 16:35:55 -08:00
CodeCompletion [CodeComplete] Suggest 'return nullptr' in functions returning pointers 2020-01-10 13:28:13 +01:00
CodeGen [X86] ABI compat bugfix for MSVC vectorcall 2020-01-14 17:49:13 -08:00
CodeGenCUDA [HIP] Add option --gpu-max-threads-per-block=n 2020-01-07 11:18:00 -05:00
CodeGenCXX [DebugInfo] Add option to clang to limit debug info that is emitted for classes. 2020-01-14 12:40:21 -08:00
CodeGenCoroutines
CodeGenObjC Only destroy static locals if they have non-trivial destructors. 2020-01-10 15:18:36 -08:00
CodeGenObjCXX Debug Info: Strengthen the synthesized-property-cleanup.mm test, NFC 2019-12-10 13:39:22 -08:00
CodeGenOpenCL [OpenCL] Fix mangling of single-overload builtins 2019-12-03 11:09:16 +00:00
CodeGenOpenCLCXX [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387) 2019-12-17 11:10:06 +00:00
Coverage
CoverageMapping Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Driver [OPENMP]Do not use RTTI by default for NVPTX devices. 2020-01-14 18:12:06 -05:00
FixIt
Format
Frontend [clang][test][NFC] Use more widely supported sanitizer for file dependency tests 2020-01-14 12:55:11 -08:00
Headers [X86] Mark various pointer arguments in builtins as const 2019-12-19 11:42:11 -08:00
Import Tighten up CHECK lines added in a9f10ebffa to work on ARM. 2019-12-05 18:35:08 -08:00
Index [OpenCL] Pretty print __private addr space 2019-12-27 13:42:07 +00:00
Integration
InterfaceStubs try to fix InterfaceStubs/lambda.cpp on Windows after bd8c8827d9 2020-01-13 21:22:46 -05:00
Layout
Lexer Fix crash on init-capture packs where the type of the initializer is non-dependent. 2019-12-19 15:20:10 -08:00
Misc Remove umask tests 2020-01-10 21:05:59 -05:00
Modules make -fmodules-codegen and -fmodules-debuginfo work also with PCHs 2020-01-15 00:01:08 +01:00
OpenMP [OPENMP]Do not emit special virtual function for NVPTX target. 2020-01-14 16:59:22 -05:00
PCH Allow /D flags absent during PCH creation under msvc-compat 2020-01-14 17:26:01 -08:00
Parser [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
Preprocessor [RISCV] Add Clang frontend support for Bitmanip extension 2020-01-14 17:45:45 +00:00
Profile Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Refactor
Rewriter
Sema Implement VectorType conditional operator GNU extension. 2020-01-13 13:27:20 -08:00
SemaCUDA
SemaCXX PR44514: Fix recovery from noexcept with non-convertible expressions 2020-01-13 13:51:48 -08:00
SemaObjC Add a FIXME and corresponding test coverage for some suspicious behavior 2020-01-10 16:12:00 -08:00
SemaObjCXX Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
SemaOpenCL CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
SemaOpenCLCXX Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
SemaSYCL [SYCL] Add sycl_kernel attribute for accelerated code outlining 2019-12-03 16:13:22 +03:00
SemaTemplate [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
TableGen
Templight
Tooling
Unit
VFS Fix external-names.c test when separator is \\ 2019-12-31 11:15:46 +00:00
clang-rename
.clang-format
CMakeLists.txt [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation 2020-01-13 10:40:18 -05:00
TestRunner.sh
cxx-sections.data
lit.cfg.py
lit.site.cfg.py.in build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
make_test_dirs.pl