diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-01-03 12:54:24 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-01-03 12:54:24 +0000 |
commit | eaeb601bd6a77b1f1c0889df45693d8c602e4863 (patch) | |
tree | a1df69cf10c24dd323dc72a5757614cc65e9a82a /contrib/llvm-project/llvm/lib/Target/BPF | |
parent | 82397d791966b09d344251bc709cd9db2b3a1902 (diff) | |
parent | 1de062e1e530408f5a06466742b26722c230c024 (diff) | |
download | src-eaeb601bd6a77b1f1c0889df45693d8c602e4863.tar.gz src-eaeb601bd6a77b1f1c0889df45693d8c602e4863.zip |
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).
MFC after: 4 weeks
X-MFC-With: r364284
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/BPF')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp index d407edfbd966..77f565fb5957 100644 --- a/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp @@ -254,7 +254,7 @@ void BPFDAGToDAGISel::PreprocessLoad(SDNode *Node, const LoadSDNode *LD = cast<LoadSDNode>(Node); uint64_t size = LD->getMemOperand()->getSize(); - if (!size || size > 8 || (size & (size - 1))) + if (!size || size > 8 || (size & (size - 1)) || !LD->isSimple()) return; SDNode *LDAddrNode = LD->getOperand(1).getNode(); @@ -342,7 +342,7 @@ bool BPFDAGToDAGISel::getConstantFieldValue(const GlobalAddressSDNode *Node, unsigned char *ByteSeq) { const GlobalVariable *V = dyn_cast<GlobalVariable>(Node->getGlobal()); - if (!V || !V->hasInitializer()) + if (!V || !V->hasInitializer() || !V->isConstant()) return false; const Constant *Init = V->getInitializer(); |