diff options
author | Artur Pilipenko <apilipenko@azulsystems.com> | 2016-04-27 11:00:48 +0000 |
---|---|---|
committer | Artur Pilipenko <apilipenko@azulsystems.com> | 2016-04-27 11:00:48 +0000 |
commit | 9bb6beabf4f4b7815b0e172530fb190a2a04c5ad (patch) | |
tree | 49dfa05b0079639b4d643f20c8e63606cb3ef8d6 /llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | |
parent | a4d7d783d04f15b65c749daa33baa3d94b1e5904 (diff) | |
download | bcm5719-llvm-9bb6beabf4f4b7815b0e172530fb190a2a04c5ad.tar.gz bcm5719-llvm-9bb6beabf4f4b7815b0e172530fb190a2a04c5ad.zip |
isSafeToLoadUnconditionally support queries without a context
This is required to use this function from isSafeToSpeculativelyExecute
Reviewed By: hfinkel
Differential Revision: http://reviews.llvm.org/D16231
llvm-svn: 267692
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 0ee6045aeed..3b0b6b767e2 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -881,8 +881,8 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) { if (SelectInst *SI = dyn_cast<SelectInst>(Op)) { // load (select (Cond, &V1, &V2)) --> select(Cond, load &V1, load &V2). unsigned Align = LI.getAlignment(); - if (isSafeToLoadUnconditionally(SI->getOperand(1), Align, SI) && - isSafeToLoadUnconditionally(SI->getOperand(2), Align, SI)) { + if (isSafeToLoadUnconditionally(SI->getOperand(1), Align, DL, SI) && + isSafeToLoadUnconditionally(SI->getOperand(2), Align, DL, SI)) { LoadInst *V1 = Builder->CreateLoad(SI->getOperand(1), SI->getOperand(1)->getName()+".val"); LoadInst *V2 = Builder->CreateLoad(SI->getOperand(2), |