[PowerPC] Don't run BV DAG Combine before legalization if it assumes legal types
commit7c82b970fb5a5a1ba989498a225f52a7935b96a0
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 15 Aug 2018 12:58:13 +0000 (15 12:58 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 15 Aug 2018 12:58:13 +0000 (15 12:58 +0000)
treedc237e095d5687e62c046c01bd0ec32d7e510507
parent47bbfe3bd01e23ff8fd416cd3fd9223414c5d9f4
[PowerPC] Don't run BV DAG Combine before legalization if it assumes legal types

When trying to combine a DAG that builds a vector out of sign-extensions of
vector extracts, the code assumes legal input types. Due to that, we have to
disable this combine prior to legalization.
In some cases, the DAG will look slightly different after legalization so
account for that in the matching code.

This is a fix for https://bugs.llvm.org/show_bug.cgi?id=38087

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339769 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/pr38087.ll [new file with mode: 0644]