[llvm] r260110 - [JumpThreading] Change a return of ComputeValueKnownInPredecessors()
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 09:05:31 PST 2016
There is no test case associated with this change, is this intentional?
On Mon, Feb 8, 2016 at 9:00 AM, Haicheng Wu via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: haicheng
> Date: Mon Feb 8 11:00:39 2016
> New Revision: 260110
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260110&view=rev
> Log:
> [JumpThreading] Change a return of ComputeValueKnownInPredecessors()
>
> Change a return statement of ComputeValueKnownInPredecessors() to be the
> same as
> the rest return statements of the function. Otherwise, it might return
> true with
> an empty Result when the current basic block has no predecessors and
> trigger the
> first assert of JumpThreading::ProcessThreadableEdges().
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=260110&r1=260109&r2=260110&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Mon Feb 8 11:00:39
> 2016
> @@ -415,7 +415,7 @@ ComputeValueKnownInPredecessors(Value *V
> for (BasicBlock *Pred : predecessors(BB))
> Result.push_back(std::make_pair(KC, Pred));
>
> - return true;
> + return !Result.empty();
> }
>
> // If V is a non-instruction value, or an instruction in a different
> block,
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160208/cc75059c/attachment.html>
More information about the llvm-commits
mailing list