diff options
| author | Chih-Hung Hsieh <chh@google.com> | 2016-12-01 21:56:33 +0000 |
|---|---|---|
| committer | Chih-Hung Hsieh <chh@google.com> | 2016-12-01 21:56:33 +0000 |
| commit | 76b913c470327fbc1a95cd5fc98b78b0f6980695 (patch) | |
| tree | 5e761abc72769a5cfb23a3e6da28e13c98885731 /llvm/include | |
| parent | a6cd5fe41538a84a7880b167709351a17fd67b22 (diff) | |
| download | bcm5719-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.h | 11 |
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; } |

