summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-04-12 23:12:17 +0000
committerNate Begeman <natebegeman@mac.com>2005-04-12 23:12:17 +0000
commitaf1c0f7a007ce33efd0b059b52ef61d120bd9254 (patch)
tree537ada904f44a48a48f708634ad3622a6e74919d /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent818eb6ddd2dd6e1fee0de819d85b7c3af6cd1206 (diff)
downloadbcm5719-llvm-af1c0f7a007ce33efd0b059b52ef61d120bd9254.tar.gz
bcm5719-llvm-af1c0f7a007ce33efd0b059b52ef61d120bd9254.zip
Fold shift by size larger than type size to undef
Make llvm undef values generate ISD::UNDEF nodes llvm-svn: 21261
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index bfceecb7aaf..f041905bb32 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -266,14 +266,7 @@ public:
} else if (isa<ConstantPointerNull>(C)) {
return N = DAG.getConstant(0, TLI.getPointerTy());
} else if (isa<UndefValue>(C)) {
- /// FIXME: Implement UNDEFVALUE better.
- if (MVT::isInteger(VT))
- return N = DAG.getConstant(0, VT);
- else if (MVT::isFloatingPoint(VT))
- return N = DAG.getConstantFP(0, VT);
- else
- assert(0 && "Unknown value type!");
-
+ return N = DAG.getNode(ISD::UNDEF, VT);
} else if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
return N = DAG.getConstantFP(CFP->getValue(), VT);
} else {
OpenPOWER on IntegriCloud