[all-commits] [llvm/llvm-project] 26a224: [CodeGen] Don't combine extract + concat vectors w...
Ties Stuij via All-commits
all-commits at lists.llvm.org
Wed Jul 8 07:30:20 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 26a22478cdfe6fe4d169320910c38958d5dafc38
https://github.com/llvm/llvm-project/commit/26a22478cdfe6fe4d169320910c38958d5dafc38
Author: Ties Stuij <ties.stuij at arm.com>
Date: 2020-07-08 (Wed, 08 Jul 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
A llvm/test/CodeGen/AArch64/regress-combine-extract-vectors.ll
Log Message:
-----------
[CodeGen] Don't combine extract + concat vectors with non-legal types
Summary:
The following combine currently breaks in the DAGCombiner:
```
extract_vector_elt (concat_vectors v4i16:a, v4i16:b), x
-> extract_vector_elt a, x
```
This happens because after we have combined these nodes we have inserted nodes
that use individual instances of the vector element type. In the above example
i16. However this isn't a legal type on all backends, and when the combining pass calls
the legalizer it breaks as it expects types to already be legal. The type legalizer has
already been run, and running it again would make a mess of the nodes.
In the example code at least, the generated code is still efficient after the change.
Reviewers: miyuki, arsenm, dmgreen, lebedev.ri
Reviewed By: miyuki, lebedev.ri
Subscribers: lebedev.ri, wdng, hiraditya, steven.zhang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83231
More information about the All-commits
mailing list