summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-07-12 06:47:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-07-12 06:47:05 +0000
commit57041d81df53c894f92b9a9fa42524061249ac8b (patch)
tree86a544c84fed5f15794298a70542e8d3bf2d516d /llvm/lib
parent65a38183f0719df97a6ce2bf6b7cc4b106e60ed9 (diff)
downloadbcm5719-llvm-57041d81df53c894f92b9a9fa42524061249ac8b.tar.gz
bcm5719-llvm-57041d81df53c894f92b9a9fa42524061249ac8b.zip
Add parentheses around an || to correct the logic. Also silences a GCC warning
that was actually useful here. Chris, please double check that this is the correct interpretation. I was pretty sure, and ran it by Nick as well. llvm-svn: 108129
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index f7bd19d78ce..13d8f4de482 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -439,7 +439,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C,
// Replace load with immediate integer if the result is an integer or fp
// value.
if ((NumBits >> 3) == StrLen + 1 && (NumBits & 7) == 0 &&
- isa<IntegerType>(Ty) || Ty->isFloatingPointTy()) {
+ (isa<IntegerType>(Ty) || Ty->isFloatingPointTy())) {
APInt StrVal(NumBits, 0);
APInt SingleChar(NumBits, 0);
if (TD->isLittleEndian()) {
OpenPOWER on IntegriCloud