]> granicus.if.org Git - llvm/commit
[DAGCombiner] add one-use restriction to vector transform with cheap extract
authorSanjay Patel <spatel@rotateright.com>
Wed, 25 Sep 2019 15:08:33 +0000 (15:08 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 25 Sep 2019 15:08:33 +0000 (15:08 +0000)
commitd7ca0d78e93e41bd6fdc6dffa04969425c243fda
tree3b99085d90d93202605a3cdd57dc9d2d49f3fe7e
parentbf42ae9f646b0f6cd2db2eb680eb04d8388cab5a
[DAGCombiner] add one-use restriction to vector transform with cheap extract

We might be able to do better on the example in the test,
but in general, we should not scalarize a splatted vector
binop if there are other uses of the binop. Otherwise, we
can end up with code as we had - a scalar op that is
redundant with a vector op.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372886 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/scalarize-fp.ll