summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-12 05:58:43 +0000
committerChris Lattner <sabre@nondot.org>2007-04-12 05:58:43 +0000
commita77cb3ce68ab1c4de384de5ebb77084f80328d06 (patch)
treeb84f33931110b6c47b4dd9c2f8fd2d93a830865d /llvm/lib/CodeGen
parent9bab80543a7230ebfb02472479d1d28f8ac412a4 (diff)
downloadbcm5719-llvm-a77cb3ce68ab1c4de384de5ebb77084f80328d06.tar.gz
bcm5719-llvm-a77cb3ce68ab1c4de384de5ebb77084f80328d06.zip
fold noop vbitconvert instructions
llvm-svn: 35943
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index a51f79f592b..7c8a94eaf5e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1484,6 +1484,15 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
MVT::getVectorNumElements(VT) == N3.getNumOperands() &&
"Illegal VECTOR_SHUFFLE node!");
break;
+ case ISD::VBIT_CONVERT:
+ // Fold vbit_convert nodes from a type to themselves.
+ if (N1.getValueType() == MVT::Vector) {
+ assert(isa<ConstantSDNode>(*(N1.Val->op_end()-2)) &&
+ isa<VTSDNode>(*(N1.Val->op_end()-1)) && "Malformed vector input!");
+ if (*(N1.Val->op_end()-2) == N2 && *(N1.Val->op_end()-1) == N3)
+ return N1;
+ }
+ break;
}
// Memoize node if it doesn't produce a flag.
OpenPOWER on IntegriCloud