summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2015-11-20 08:16:13 +0000
committerOwen Anderson <resistor@mac.com>2015-11-20 08:16:13 +0000
commit630077ef558317ac85bfc266737040eaecd0bcb0 (patch)
treede32cd0ae4432959e87b9a995d5647df30ac4dad /llvm/lib/Transforms/Scalar/Reassociate.cpp
parent7d0cc2378655423462e33aebb7f7cd13588734a9 (diff)
downloadbcm5719-llvm-630077ef558317ac85bfc266737040eaecd0bcb0.tar.gz
bcm5719-llvm-630077ef558317ac85bfc266737040eaecd0bcb0.zip
Fix a pair of issues that caused an infinite loop in reassociate.
Terrifyingly, one of them is a mishandling of floating point vectors in Constant::isZero(). How exactly this issue survived this long is beyond me. llvm-svn: 253655
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 82c79e7d919..fa2f7d995c6 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -2064,7 +2064,7 @@ void Reassociate::OptimizeInst(Instruction *I) {
return;
// Don't optimize floating point instructions that don't have unsafe algebra.
- if (I->getType()->isFloatingPointTy() && !I->hasUnsafeAlgebra())
+ if (I->getType()->isFPOrFPVectorTy() && !I->hasUnsafeAlgebra())
return;
// Do not reassociate boolean (i1) expressions. We want to preserve the
OpenPOWER on IntegriCloud