summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-29 05:55:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-29 05:55:35 +0000
commitc968ea0495d04d87d697ab17c4c870ac2c199af3 (patch)
tree98a542ecdb18a703d6e5b3b534d4f115f9debdae /llvm/lib/Transforms
parenta8b889490ec05c69ed44b155fdae01096052d2ef (diff)
downloadbcm5719-llvm-c968ea0495d04d87d697ab17c4c870ac2c199af3.tar.gz
bcm5719-llvm-c968ea0495d04d87d697ab17c4c870ac2c199af3.zip
Remove optimizations that don't require both operands to be constant. These
are moved to simplify-libcalls pass. llvm-svn: 21614
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 07b3249c8c4..4d141533b88 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -360,16 +360,6 @@ Constant *llvm::ConstantFoldCall(Function *F,
} else if (Name == "atan2")
return ConstantFP::get(Ty, atan2(Op1V,Op2V));
}
- else if (Name == "pow" && Op1V == 1.0) {
- return ConstantFP::get(Ty,1.0);
- }
- } else if (ConstantFP* Op2 = dyn_cast<ConstantFP>(Operands[1])) {
- double Op2V = Op2->getValue();
- if (Name == "pow")
- if (Op2V == 0.0)
- return ConstantFP::get(Ty,1.0);
- else if (Op2V == 1.0)
- return Operands[0];
}
}
return 0;
OpenPOWER on IntegriCloud