[llvm] r285399 - [SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR element has no known bits
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 07:07:44 PDT 2016
Author: rksimon
Date: Fri Oct 28 09:07:44 2016
New Revision: 285399
URL: http://llvm.org/viewvc/llvm-project?rev=285399&view=rev
Log:
[SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR element has no known bits
No need to check the remaining elements - no common known bits are available.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=285399&r1=285398&r2=285399&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Oct 28 09:07:44 2016
@@ -2042,6 +2042,10 @@ void SelectionDAG::computeKnownBits(SDVa
// TODO: support per-element known bits.
KnownOne &= KnownOne2;
KnownZero &= KnownZero2;
+
+ // If we don't know any bits, early out.
+ if (!KnownOne && !KnownZero)
+ break;
}
break;
case ISD::AND:
More information about the llvm-commits
mailing list