llvm-project/llvm
Matthias Braun 08abcac9dc PeepholeOptimizer: Do not form PHI with subreg arguments
When replacing a PHI the PeepholeOptimizer currently takes the register
class of the register at the first operand. This however is not correct
if this argument has a subregister index.

As there is currently no API to query the register class resulting from
applying a subregister index to all registers in a class, we can only
abort in these cases and not perform the transformation.

This changes findNextSource() to require the end of all copy chains to
not use a subregister if there is any PHI in the chain. I had to rewrite
the overly complicated inner loop there to have a good place to insert
the new check.

This fixes https://llvm.org/PR33071 (aka rdar://32262041)

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

llvm-svn: 322313
2018-01-11 21:57:03 +00:00
..
bindings [bindings/go] fix vet errors 2017-12-28 04:10:09 +00:00
cmake [cmake] Use symlinks for Windows-hosted toolchains built on Unix 2018-01-09 07:50:18 +00:00
docs [docs] Update Phabricator docs about setting repository for diffs uploaded via web 2018-01-11 16:30:08 +00:00
examples PR35705: Fix Chapter 9 example code for API changes to DIBuilder 2017-12-20 19:36:54 +00:00
include [WebAssemlby] MC: Don't write COMDAT symbols as global imports 2018-01-11 20:35:17 +00:00
lib PeepholeOptimizer: Do not form PHI with subreg arguments 2018-01-11 21:57:03 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [CMake] Support for cross-compilation when build runtimes 2018-01-08 23:50:59 +00:00
test PeepholeOptimizer: Do not form PHI with subreg arguments 2018-01-11 21:57:03 +00:00
tools [llvm-readobj] Consistent use of ScopedPrinter 2018-01-10 00:14:19 +00:00
unittests Use size_t to represent the size of a StringMapEntry length and alignment rather than unsigned. 2018-01-11 18:47:15 +00:00
utils [TableGen][AsmMatcherEmitter] Generate assembler checks for tied operands 2018-01-10 10:10:56 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt The trunk version is now 7.0.0svn 2018-01-03 14:52:54 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

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.