diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2015-08-14 22:46:49 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2015-08-14 22:46:49 +0000 |
commit | 8075fd22b9f65b0d1da3d9aa071115a479c81eb4 (patch) | |
tree | 6606a4a0e8a900723131503f5a10e22d6f9b5df5 /llvm/lib/Transforms | |
parent | 9791ed4705f6202c520123b6c668a3cb28fba3aa (diff) | |
download | bcm5719-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.cpp | 3 |
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); |