projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32bc031
)
Use dyn_cast instead of isa && cast. No functionality change.
author
Jakub Staszak
<kubastaszak@gmail.com>
Wed, 6 Mar 2013 00:16:16 +0000
(
00:16
+0000)
committer
Jakub Staszak
<kubastaszak@gmail.com>
Wed, 6 Mar 2013 00:16:16 +0000
(
00:16
+0000)
llvm-svn: 176537
llvm/lib/Analysis/ValueTracking.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ValueTracking.cpp
b/llvm/lib/Analysis/ValueTracking.cpp
index
8e3994e
..
45b75df
100644
(file)
--- a/
llvm/lib/Analysis/ValueTracking.cpp
+++ b/
llvm/lib/Analysis/ValueTracking.cpp
@@
-1396,10
+1396,10
@@
bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
return true;
// (add x, 0.0) is guaranteed to return +0.0, not -0.0.
- if (I->getOpcode() == Instruction::FAdd
&&
- isa<ConstantFP>(I->getOperand(1)) &&
-
cast<ConstantFP>(I->getOperand(1))
->isNullValue())
- return true;
+ if (I->getOpcode() == Instruction::FAdd
)
+ if (ConstantFP *CFP = dyn_cast<ConstantFP>(I->getOperand(1)))
+
if (CFP
->isNullValue())
+
return true;
// sitofp and uitofp turn into +0.0 for zero.
if (isa<SIToFPInst>(I) || isa<UIToFPInst>(I))