summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2015-08-14 22:46:49 +0000
committerNick Lewycky <nicholas@mxc.ca>2015-08-14 22:46:49 +0000
commit8075fd22b9f65b0d1da3d9aa071115a479c81eb4 (patch)
tree6606a4a0e8a900723131503f5a10e22d6f9b5df5 /llvm/lib/Transforms
parent9791ed4705f6202c520123b6c668a3cb28fba3aa (diff)
downloadbcm5719-llvm-8075fd22b9f65b0d1da3d9aa071115a479c81eb4.tar.gz
bcm5719-llvm-8075fd22b9f65b0d1da3d9aa071115a479c81eb4.zip
Fix a crash where a utility function wasn't aware of fcmp vectors and created a value with the wrong type. Fixes PR24458!
llvm-svn: 245119
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index ee21c81fa26..15e0889b51b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -93,7 +93,8 @@ static Value *getFCmpValue(bool isordered, unsigned code,
case 5: Pred = isordered ? FCmpInst::FCMP_ONE : FCmpInst::FCMP_UNE; break;
case 6: Pred = isordered ? FCmpInst::FCMP_OLE : FCmpInst::FCMP_ULE; break;
case 7:
- if (!isordered) return ConstantInt::getTrue(LHS->getContext());
+ if (!isordered)
+ return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 1);
Pred = FCmpInst::FCMP_ORD; break;
}
return Builder->CreateFCmp(Pred, LHS, RHS);
OpenPOWER on IntegriCloud