diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-11-25 11:14:43 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2013-11-25 11:14:43 +0000 |
commit | b021c6fdbd4b670f4a972dd1da7ee36581b3e76a (patch) | |
tree | a268111cfe7898b2750415d3abba4f709ab76480 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 5500f6163fbe80ab1991434e03244a1f62f7fdce (diff) | |
download | bcm5719-llvm-b021c6fdbd4b670f4a972dd1da7ee36581b3e76a.tar.gz bcm5719-llvm-b021c6fdbd4b670f4a972dd1da7ee36581b3e76a.zip |
Fixed tryFoldToZero() for vector types that need expansion.
Summary:
Moved the requirement for SelectionDAG::getConstant() to return legally
typed nodes slightly earlier. There were two optional DAGCombine passes
that were missed out and were required to produce type-legal DAGs.
Simplified a code-path in tryFoldToZero() to use SelectionDAG::getConstant().
This provides support for both promoted and expanded vector types whereas the
previous code only supported promoted vector types.
Fixes a "Type for zero vector elements is not legal" assertion detected by
an llvm-stress generated test.
Reviewers: resistor
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2251
llvm-svn: 195635
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c0e8a72aa34..6c335d96c73 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -671,6 +671,8 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { DEBUG(dbgs() << "Type-legalized selection DAG: BB#" << BlockNumber << " '" << BlockName << "'\n"; CurDAG->dump()); + CurDAG->NewNodesMustHaveLegalTypes = true; + if (Changed) { if (ViewDAGCombineLT) CurDAG->viewGraph("dag-combine-lt input for " + BlockName); @@ -712,8 +714,6 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << BlockNumber << " '" << BlockName << "'\n"; CurDAG->dump()); } - CurDAG->NewNodesMustHaveLegalTypes = true; - if (ViewLegalizeDAGs) CurDAG->viewGraph("legalize input for " + BlockName); { |