summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-12-01 21:56:33 +0000
committerChih-Hung Hsieh <chh@google.com>2016-12-01 21:56:33 +0000
commit76b913c470327fbc1a95cd5fc98b78b0f6980695 (patch)
tree5e761abc72769a5cfb23a3e6da28e13c98885731 /llvm/include
parenta6cd5fe41538a84a7880b167709351a17fd67b22 (diff)
downloadbcm5719-llvm-76b913c470327fbc1a95cd5fc98b78b0f6980695.tar.gz
bcm5719-llvm-76b913c470327fbc1a95cd5fc98b78b0f6980695.zip
[SelectionDAG] getRawSubclassData should not return HasDebugValue.
This change fixes a regression in r279537 and makes getRawSubclassData behave like r279536. Without this change, the fp128-g.ll test case will have an infinite loop involving SoftenFloatRes_LOAD. Differential Revision: http://reviews.llvm.org/D26942 llvm-svn: 288420
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAGNodes.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 079e81ba2ac..d4b7170eac3 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -415,6 +415,7 @@ protected:
class SDNodeBitfields {
friend class SDNode;
friend class MemIntrinsicSDNode;
+ friend class MemSDNode;
uint16_t HasDebugValue : 1;
uint16_t IsMemIntrinsic : 1;
@@ -1134,11 +1135,19 @@ public:
return MMO->getAlignment();
}
- /// Return the SubclassData value, which contains an
+ /// Return the SubclassData value, without HasDebugValue. This contains an
/// encoding of the volatile flag, as well as bits used by subclasses. This
/// function should only be used to compute a FoldingSetNodeID value.
+ /// The HasDebugValue bit is masked out because CSE map needs to match
+ /// nodes with debug info with nodes without debug info.
unsigned getRawSubclassData() const {
uint16_t Data;
+ union {
+ char RawSDNodeBits[sizeof(uint16_t)];
+ SDNodeBitfields SDNodeBits;
+ };
+ memcpy(&RawSDNodeBits, &this->RawSDNodeBits, sizeof(this->RawSDNodeBits));
+ SDNodeBits.HasDebugValue = 0;
memcpy(&Data, &RawSDNodeBits, sizeof(RawSDNodeBits));
return Data;
}
OpenPOWER on IntegriCloud