[PATCH] D16014: CannotBeOrderedLessThanZero: add some missing cases
escha via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 15:16:20 PST 2016
escha created this revision.
escha added reviewers: resistor, delena, spatel.
escha added a subscriber: llvm-commits.
escha set the repository for this revision to rL LLVM.
Per the title.
Repository:
rL LLVM
http://reviews.llvm.org/D16014
Files:
lib/Analysis/ValueTracking.cpp
Index: lib/Analysis/ValueTracking.cpp
===================================================================
--- lib/Analysis/ValueTracking.cpp
+++ lib/Analysis/ValueTracking.cpp
@@ -2334,14 +2334,24 @@
case Instruction::FRem:
return CannotBeOrderedLessThanZero(I->getOperand(0), Depth+1) &&
CannotBeOrderedLessThanZero(I->getOperand(1), Depth+1);
+ case Instruction::Select:
+ return CannotBeOrderedLessThanZero(I->getOperand(1), Depth+1) &&
+ CannotBeOrderedLessThanZero(I->getOperand(2), Depth+1);
case Instruction::FPExt:
case Instruction::FPTrunc:
+ case Instruction::UIToFP:
// Widening/narrowing never change sign.
return CannotBeOrderedLessThanZero(I->getOperand(0), Depth+1);
case Instruction::Call:
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
switch (II->getIntrinsicID()) {
default: break;
+ case Intrinsic::maxnum:
+ return CannotBeOrderedLessThanZero(I->getOperand(0), Depth+1) ||
+ CannotBeOrderedLessThanZero(I->getOperand(1), Depth+1);
+ case Intrinsic::minnum:
+ return CannotBeOrderedLessThanZero(I->getOperand(0), Depth+1) &&
+ CannotBeOrderedLessThanZero(I->getOperand(1), Depth+1);
case Intrinsic::exp:
case Intrinsic::exp2:
case Intrinsic::fabs:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16014.44381.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160108/39ba1557/attachment.bin>
More information about the llvm-commits
mailing list