summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-01 10:21:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-01 10:21:05 +0000
commitc5bfb3c0f58a62145d90c0bafb5b99e2cb9e11d9 (patch)
tree4e35a36a6ecf31a21112688af822fded3df748f2 /llvm/lib
parent1989bb9c43fc10b51b36c977c99a5f7e7f345eb3 (diff)
downloadbcm5719-llvm-c5bfb3c0f58a62145d90c0bafb5b99e2cb9e11d9.tar.gz
bcm5719-llvm-c5bfb3c0f58a62145d90c0bafb5b99e2cb9e11d9.zip
Fix a pretty scary bug I introduced into the always inliner with
a single missing character. Somehow, this had gone untested. I've added tests for returns-twice logic specifically with the always-inliner that would have caught this, and fixed the bug. Thanks to Matt for the careful review and spotting this!!! =D llvm-svn: 153832
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/InlineAlways.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineAlways.cpp b/llvm/lib/Transforms/IPO/InlineAlways.cpp
index a977027eed1..664ddf6f7a2 100644
--- a/llvm/lib/Transforms/IPO/InlineAlways.cpp
+++ b/llvm/lib/Transforms/IPO/InlineAlways.cpp
@@ -83,7 +83,7 @@ static bool isInlineViable(Function &F) {
// Disallow calls which expose returns-twice to a function not previously
// attributed as such.
- if (ReturnsTwice && CS.isCall() &&
+ if (!ReturnsTwice && CS.isCall() &&
cast<CallInst>(CS.getInstruction())->canReturnTwice())
return false;
}
OpenPOWER on IntegriCloud