diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2015-10-14 20:45:00 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2015-10-14 20:45:00 +0000 |
commit | 048cc97fb1900dc2143753f851c742ae30ece4bb (patch) | |
tree | 1f8ba5f417a3468204acf4446376c6ed7560a437 /llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | |
parent | 147bb89d520c0868d0a857e37c714de73558c3cc (diff) | |
download | bcm5719-llvm-048cc97fb1900dc2143753f851c742ae30ece4bb.tar.gz bcm5719-llvm-048cc97fb1900dc2143753f851c742ae30ece4bb.zip |
[PowerPC] Fix invalid lxvdsx optimization (PR25157)
PR25157 identifies a bug where a load plus a vector shuffle is
incorrectly converted into an LXVDSX instruction. That optimization
is only valid if the load is of a doubleword, and in the noted case,
it was not. This corrects that problem.
Joint patch with Eric Schweitz, who provided the bugpoint-reduced test
case.
llvm-svn: 250324
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 4fd57be8c9d..e876a186f86 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -2799,6 +2799,8 @@ SDNode *PPCDAGToDAGISel::Select(SDNode *N) { SDValue Base, Offset; if (LD->isUnindexed() && + (LD->getMemoryVT() == MVT::f64 || + LD->getMemoryVT() == MVT::i64) && SelectAddrIdxOnly(LD->getBasePtr(), Base, Offset)) { SDValue Chain = LD->getChain(); SDValue Ops[] = { Base, Offset, Chain }; |