summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorStefan Stipanovic <sstipanovic@s-energize.com>2019-12-17 20:41:09 +0100
committerStefan Stipanovic <sstipanovic@s-energize.com>2019-12-17 20:41:09 +0100
commitfff8ec98139379968cc7cebb71d771cf58a39a5c (patch)
tree8081a0a194e05902e17d08267fb79ba12aa31eba /llvm/lib/Transforms
parentd020e67575d9806d318787eec9d71828eab8f57a (diff)
downloadbcm5719-llvm-fff8ec98139379968cc7cebb71d771cf58a39a5c.tar.gz
bcm5719-llvm-fff8ec98139379968cc7cebb71d771cf58a39a5c.zip
[Attributor] H2S fix.
Summary: Fixing issues that were noticed in D71521 Reviewers: jdoerfert, lebedev.ri, uenoku Subscribers: Differential Revision: https://reviews.llvm.org/D71564
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 846af427ffa..cd305ee18eb 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -4335,7 +4335,7 @@ ChangeStatus AAHeapToStackImpl::updateImpl(Attributor &A) {
if (IsMalloc) {
if (auto *Size = dyn_cast<ConstantInt>(I.getOperand(0)))
- if (Size->getValue().sle(MaxHeapToStackSize))
+ if (Size->getValue().ule(MaxHeapToStackSize))
if (UsesCheck(I) || FreeCheck(I)) {
MallocCalls.insert(&I);
return true;
@@ -4345,7 +4345,7 @@ ChangeStatus AAHeapToStackImpl::updateImpl(Attributor &A) {
if (auto *Num = dyn_cast<ConstantInt>(I.getOperand(0)))
if (auto *Size = dyn_cast<ConstantInt>(I.getOperand(1)))
if ((Size->getValue().umul_ov(Num->getValue(), Overflow))
- .sle(MaxHeapToStackSize))
+ .ule(MaxHeapToStackSize))
if (!Overflow && (UsesCheck(I) || FreeCheck(I))) {
MallocCalls.insert(&I);
return true;
OpenPOWER on IntegriCloud