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

llvm-svn: 259625
diff --git a/llvm/lib/Transforms/IPO/LowerBitSets.cpp b/llvm/lib/Transforms/IPO/LowerBitSets.cpp
index 92eaf9f..7b9879c 100644
--- a/llvm/lib/Transforms/IPO/LowerBitSets.cpp
+++ b/llvm/lib/Transforms/IPO/LowerBitSets.cpp
@@ -920,7 +920,7 @@
 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.