llvm-project/llvm
Craig Topper 3980d1ca6b [X86] Disable argument copy elision for arguments passed via pointers
Summary:
If you pass two 1024 bit vectors in IR with AVX2 on Windows 64. Both vectors will be split in four 256 bit pieces. The four pieces of the first argument will be passed indirectly using 4 gprs. The second argument will get passed via pointers in memory.

The PartOffsets stored for the second argument are all in terms of its original 1024 bit size. So the PartOffsets for each piece are 32 bytes apart. So if we consider it for copy elision we'll only load an 8 byte pointer, but we'll move the address 32 bytes. The stack object size we create for the first part is probably wrong too.

This issue was encountered by ISPC. I'm working on getting a reduce test case, but wanted to go ahead and get feedback on the fix.

Reviewers: rnk

Reviewed By: rnk

Subscribers: dbabokin, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 358817
2019-04-20 15:26:44 +00:00
..
benchmarks
bindings [OCaml] Update api to account for FNeg and CallBr instructions 2019-04-16 15:00:19 +00:00
cmake [CMake] Pass monorepo build settings in cross compile 2019-04-19 20:08:55 +00:00
docs [llvm-symbolizer] Add llvm-addr2line 2019-04-19 10:17:52 +00:00
examples
include Revert "Revert "[GlobalISel] Add legalization support for non-power-2 loads and stores"" 2019-04-19 23:54:44 +00:00
lib [X86] Disable argument copy elision for arguments passed via pointers 2019-04-20 15:26:44 +00:00
projects
resources
runtimes
test [X86] Disable argument copy elision for arguments passed via pointers 2019-04-20 15:26:44 +00:00
tools [llvm-objdump] Fix End in disassemblyObject after rL358806 2019-04-20 07:48:41 +00:00
unittests [ADT] Avoid warning in bsearch testcase 2019-04-20 11:48:11 +00:00
utils Update GN files to build with r358103 2019-04-19 22:27:50 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMake] Move configuration of LLVM_CXX_STD to HandleLLVMOptions.cmake 2019-04-09 08:14:32 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.