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 | 4c6f917d3488ba6da95e7efc66ead08f13661080 (patch) | |
tree | a1cdc2f694a5e54413c26afb945e0a6f1d9a2483 /llvm/lib/CodeGen | |
parent | d6d1f189450e55512a0413f1f9cffdbf71e405fe (diff) | |
download | bcm5719-llvm-4c6f917d3488ba6da95e7efc66ead08f13661080.tar.gz bcm5719-llvm-4c6f917d3488ba6da95e7efc66ead08f13661080.zip |
Make sure type is not extended or untyped before create a constant of the type. No test case. Found by inspection.
llvm-svn: 159179
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 0bdd8b85497..28c3be9eb60 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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()) { |