summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2016-04-03 19:32:13 +0000
committerPeter Zotov <whitequark@whitequark.org>2016-04-03 19:32:13 +0000
commit8efe38a1e2c469d49548a23f4f576dfad52b40e4 (patch)
tree0a9bf1a3d3286115abeb9910fa87508eed8cc572 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentae8bd4bd11676afd663a0ad993077bd70a9be29f (diff)
downloadbcm5719-llvm-8efe38a1e2c469d49548a23f4f576dfad52b40e4.tar.gz
bcm5719-llvm-8efe38a1e2c469d49548a23f4f576dfad52b40e4.zip
[CodeGenPrepare] Fix r265264 (again).
Don't require TLI for SinkCmpExpression, like it wasn't before r265264. llvm-svn: 265271
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index ba68a4ec252..89ffab437b1 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -855,11 +855,11 @@ static bool CombineUAddWithOverflow(CmpInst *CI) {
/// lose; some adjustment may be wanted there.
///
/// Return true if any changes are made.
-static bool SinkCmpExpression(CmpInst *CI, const TargetLowering &TLI) {
+static bool SinkCmpExpression(CmpInst *CI, const TargetLowering *TLI) {
BasicBlock *DefBB = CI->getParent();
// Avoid sinking soft-FP comparisons, since this can move them into a loop.
- if (TLI.useSoftFloat() && isa<FCmpInst>(CI))
+ if (TLI && TLI->useSoftFloat() && isa<FCmpInst>(CI))
return false;
// Only insert a cmp in each block once.
@@ -911,7 +911,7 @@ static bool SinkCmpExpression(CmpInst *CI, const TargetLowering &TLI) {
}
static bool OptimizeCmpExpression(CmpInst *CI, const TargetLowering *TLI) {
- if (TLI && SinkCmpExpression(CI, *TLI))
+ if (SinkCmpExpression(CI, TLI))
return true;
if (CombineUAddWithOverflow(CI))
OpenPOWER on IntegriCloud