LowerBitSets: Don't bother to do any work if the llvm.bitset.test intrinsic is unused.

llvm-svn: 259625
This commit is contained in:
Peter Collingbourne 2016-02-03 03:48:46 +00:00
parent 6410c66883
commit 7f6faddfa9

View File

@ -920,7 +920,7 @@ void LowerBitSets::buildBitSetsFromDisjointSet(
bool LowerBitSets::buildBitSets() {
Function *BitSetTestFunc =
M->getFunction(Intrinsic::getName(Intrinsic::bitset_test));
if (!BitSetTestFunc)
if (!BitSetTestFunc || BitSetTestFunc->use_empty())
return false;
// Equivalence class set containing bitsets and the globals they reference.