[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Fri Mar 24 10:45:33 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.337 -> 1.338
---
Log message:
Only to vector shuffle for {x,x,y,y} cases when SCALAR_TO_VECTOR is free.
---
Diffs of the changes: (+2 -1)
LegalizeDAG.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.337 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.338
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.337 Fri Mar 24 01:29:17 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Mar 24 12:45:20 2006
@@ -3209,7 +3209,8 @@
SDOperand ShuffleMask = DAG.getNode(ISD::BUILD_VECTOR, MaskVT, MaskVec);
// If the target supports VECTOR_SHUFFLE and this shuffle mask, use it.
- if (TLI.isShuffleLegal(Node->getValueType(0), ShuffleMask)) {
+ if (TLI.isShuffleLegal(Node->getValueType(0), ShuffleMask) &&
+ TLI.isOperationLegal(ISD::SCALAR_TO_VECTOR, Node->getValueType(0))) {
std::vector<SDOperand> Ops;
for(std::map<SDOperand,std::vector<unsigned> >::iterator I=Values.begin(),
E = Values.end(); I != E; ++I) {
More information about the llvm-commits
mailing list