diff options
author | QingShan Zhang <qshanz@cn.ibm.com> | 2019-05-08 07:32:12 +0000 |
---|---|---|
committer | QingShan Zhang <qshanz@cn.ibm.com> | 2019-05-08 07:32:12 +0000 |
commit | 0e71a6e755f092f4ba8fca2a80f211b9808a7893 (patch) | |
tree | 5111196b02f8c606d5f5aba454aa950044e1d8bb /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 17dbb19f704d7903ca04494e4c7b459db034bf00 (diff) | |
download | llvm-0e71a6e755f092f4ba8fca2a80f211b9808a7893.zip llvm-0e71a6e755f092f4ba8fca2a80f211b9808a7893.tar.gz llvm-0e71a6e755f092f4ba8fca2a80f211b9808a7893.tar.bz2 |
[CodeGenPrepare] Don't split the store if it is volatile
We shouldn't split the store when it is volatile.
Differential Revision: https://reviews.llvm.org/D61169
llvm-svn: 360228
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 355455a..fad3d4a 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -6657,6 +6657,10 @@ static bool splitMergedValStore(StoreInst &SI, const DataLayout &DL, DL.getTypeSizeInBits(SplitStoreType)) return false; + // Don't split the store if it is volatile. + if (SI.isVolatile()) + return false; + // Match the following patterns: // (store (or (zext LValue to i64), // (shl (zext HValue to i64), 32)), HalfValBitSize) |