[llvm-commits] [llvm] r108129 - /llvm/trunk/lib/Analysis/ConstantFolding.cpp

Chandler Carruth chandlerc at gmail.com
Sun Jul 11 23:47:05 PDT 2010


Author: chandlerc
Date: Mon Jul 12 01:47:05 2010
New Revision: 108129

URL: http://llvm.org/viewvc/llvm-project?rev=108129&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Analysis/ConstantFolding.cpp

Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=108129&r1=108128&r2=108129&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
+++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Mon Jul 12 01:47:05 2010
@@ -439,7 +439,7 @@
     // 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()) {





More information about the llvm-commits mailing list