From 490b8f5d64823d998fc12ad3a91ecacd82c1901e Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 12 Jul 2010 06:47:05 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108129 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ConstantFolding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index f7bd19d78ce..13d8f4de482 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/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(Ty) || Ty->isFloatingPointTy()) { + (isa(Ty) || Ty->isFloatingPointTy())) { APInt StrVal(NumBits, 0); APInt SingleChar(NumBits, 0); if (TD->isLittleEndian()) {