[PATCH] D15857: [InstCombine] Defend against worst-case exponential execution time
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 09:57:17 PST 2016
majnemer added a subscriber: majnemer.
================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1775-1777
@@ -1756,3 +1774,5 @@
SmallPtrSet<Value*, 2> OrValues;
- if (CollectBitParts(&I, 0, BitMask, BitValues, BitProvenance, OrValues))
+ unsigned NumOrsRemaining = BitMask.getBitWidth();
+ if (CollectBitParts(&I, 0, BitMask, BitValues, BitProvenance, OrValues,
+ NumOrsRemaining))
return nullptr;
----------------
This seems a bit much if you have i128. What is NumOrsRemaining typically when this optimization kicks in?
Repository:
rL LLVM
http://reviews.llvm.org/D15857
More information about the llvm-commits
mailing list