OSDN Git Service

[InstCombine] scalarizePHI should not assume the code it sees has been CSE'd
authorMichael Kuperstein <mkuper@google.com>
Mon, 6 Jun 2016 23:38:33 +0000 (23:38 +0000)
committerMichael Kuperstein <mkuper@google.com>
Mon, 6 Jun 2016 23:38:33 +0000 (23:38 +0000)
commit6954e6256d9adbdf2e40b79fee09a0dac21bbbb7
treee071471c34e241c7eec8ca3c8a068fb5edc7709e
parent115c4998df7a23d97504f3ec2a77e56efd429c56
[InstCombine] scalarizePHI should not assume the code it sees has been CSE'd

scalarizePHI only looked for phis that have exactly two uses - the "latch"
use, and an extract. Unfortunately, we can not assume all equivalent extracts
are CSE'd, since InstCombine itself may create an extract which is a duplicate
of an existing one. This extends it to handle several distinct extracts from
the same index.

This should fix at least some of the  performance regressions from PR27988.

Differential Revision: http://reviews.llvm.org/D20983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271961 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/vec_phi_extract.ll
test/Transforms/LoopVectorize/PowerPC/vsx-tsvc-s173.ll