diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-06-26 01:19:33 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-06-26 01:19:33 +0000 |
commit | 16436dffb50fac4677c7162639f8da0b73eb4e99 (patch) | |
tree | 4a3acef205536859e23c92d766c3651ee4407bf1 /lib | |
parent | db1714eb4149fc8a2dcd9d07ca50fc1db8dc8e13 (diff) | |
download | llvm-16436dffb50fac4677c7162639f8da0b73eb4e99.tar.gz llvm-16436dffb50fac4677c7162639f8da0b73eb4e99.tar.bz2 llvm-16436dffb50fac4677c7162639f8da0b73eb4e99.tar.xz |
Make sure type is not extended or untyped before create a constant of the type. No test case. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0bdd8b8549..28c3be9eb6 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -5020,6 +5020,10 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) { LoadSDNode *LN0 = cast<LoadSDNode>(N0); EVT PtrType = N0.getOperand(1).getValueType(); + if (PtrType == MVT::Untyped || PtrType.isExtended()) + // It's not possible to generate a constant of extended or untyped type. + return SDValue(); + // For big endian targets, we need to adjust the offset to the pointer to // load the correct bytes. if (TLI.isBigEndian()) { |