[llvm] r296982 - [SimplifyCFG] Use APInt::operator| instead of APInt::Or. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 4 17:08:20 PST 2017
Author: ctopper
Date: Sat Mar 4 19:08:19 2017
New Revision: 296982
URL: http://llvm.org/viewvc/llvm-project?rev=296982&view=rev
Log:
[SimplifyCFG] Use APInt::operator| instead of APInt::Or. NFC
I'm looking to improve operator| to support rvalue references and may remove APInt::Or.
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=296982&r1=296981&r2=296982&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Sat Mar 4 19:08:19 2017
@@ -4385,7 +4385,7 @@ static bool EliminateDeadSwitchCases(Swi
bool HasDefault =
!isa<UnreachableInst>(SI->getDefaultDest()->getFirstNonPHIOrDbg());
const unsigned NumUnknownBits =
- Bits - (KnownZero.Or(KnownOne)).countPopulation();
+ Bits - (KnownZero | KnownOne).countPopulation();
assert(NumUnknownBits <= Bits);
if (HasDefault && DeadCases.empty() &&
NumUnknownBits < 64 /* avoid overflow */ &&
More information about the llvm-commits
mailing list