1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Go to file
Craig Topper 20e1cfd79a [X86] Prefer MOVSS/SD over BLENDI during legalization. Remove BLENDI versions of scalar arithmetic patterns
Summary:
We currently disable some converting of shuffles to MOVSS/MOVSD during legalization if SSE41 is enabled. But later during shuffle combining we go back to prefering MOVSS/MOVSD.

Additionally we have patterns that look for BLENDIs to detect scalar arithmetic operations. I believe due to the combining using MOVSS/MOVSD these are unnecessary.

Interestingly, we still codegen blend instructions even though lowering/isel emit movss/movsd instructions. Turns out machine CSE commutes them to blend, and then commuting those blends back into blends that are equivalent to the original movss/movsd.

This patch fixes the inconsistency in legalization to prefer MOVSS/MOVSD. The one test change was caused by this change. The problem is that we have integer types and are mostly selecting integer instructions except for the shufps. This shufps forced the execution domain, but the vpblendw couldn't have its domain changed with a naive instruction swap. We could fix this by special casing VPBLENDW based on the immediate to widen the element type.

The rest of the patch is removing all the excess scalar patterns.

Long term we should probably add isel patterns to make MOVSS/MOVSD emit blends directly instead of relying on the double commute. We may also want to consider emitting movss/movsd for optsize. I also wonder if we should still use the VEX encoded blendi instructions even with AVX512. Blends have better throughput, and that may outweigh the register constraint.

Reviewers: RKSimon, zvi

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 315181
2017-10-08 16:57:23 +00:00
bindings Update the Go bindings for r309426 (remove offset from llvm.dbg.value) 2017-07-28 22:44:44 +00:00
cmake Bring r314809 back. 2017-10-04 20:27:01 +00:00
docs llvm-dwarfdump: Add an option to collect debug info quality metrics. 2017-10-06 20:24:34 +00:00
examples Fix broken links to the Itanium CXX ABI 2017-09-12 00:19:11 +00:00
include Make more constructors constexpr or use =default. 2017-10-08 15:59:35 +00:00
lib [X86] Prefer MOVSS/SD over BLENDI during legalization. Remove BLENDI versions of scalar arithmetic patterns 2017-10-08 16:57:23 +00:00
projects Add temporary workaround to allow in-tree libc++ builds on Windows 2017-05-11 01:44:30 +00:00
resources
runtimes [CMake][runtimes] Use the same configuration for non-target and "default" target 2017-09-08 22:26:50 +00:00
test [X86] Prefer MOVSS/SD over BLENDI during legalization. Remove BLENDI versions of scalar arithmetic patterns 2017-10-08 16:57:23 +00:00
tools [llvm-rc] Fix some endianness errors. 2017-10-06 23:21:43 +00:00
unittests Support: Rewrite Windows implementation of sys::fs::rename to be more POSIXy. 2017-10-06 17:14:36 +00:00
utils [X86][TableGen] Recommitting the X86 memory folding tables TableGen backend while disabling it by default. 2017-10-08 09:20:32 +00:00
.arcconfig project_id is from another era in phabricator land and does not provide any value. 2016-09-27 15:47:29 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Revert "[CMake] Remove CMAKE_.*_OUTPUT_DIRECTORY (NFCI)" 2017-09-29 19:50:41 +00:00
CODE_OWNERS.TXT [ARC] Add ARC backend. 2017-08-24 15:40:33 +00:00
configure
CREDITS.TXT Add myself to CREDITS.txt 2017-09-18 14:33:39 +00:00
LICENSE.TXT Bump year to 2017 in LICENSE.txt 2017-01-12 18:02:42 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Test commit access 2017-08-18 02:39:28 +00:00
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00

Low Level Virtual Machine (LLVM)
================================

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.