This is a simple question we should be able to answer without creating a temporary to hold the AND result. We can also get an early out as soon as we find a word that intersects.
Details
Details
Diff Detail
Diff Detail
Differential D32253
[APInt] Implement APInt::intersects without creating a temporary APInt in the multiword case craig.topper on Apr 19 2017, 4:01 PM. Authored by
Details This is a simple question we should be able to answer without creating a temporary to hold the AND result. We can also get an early out as soon as we find a word that intersects.
Diff Detail |
Shouldn't just pVal[i] & RHS.pVal[i] suffice?
Then at that point you can just rewrite it as :
return llvm::all_of etc..