SpeculativeExecution: Fix for logic change introduced in D81730.
authordfukalov <daniil.fukalov@amd.com>
Mon, 29 Jun 2020 12:41:40 +0000 (15:41 +0300)
committerdfukalov <daniil.fukalov@amd.com>
Thu, 9 Jul 2020 12:45:23 +0000 (15:45 +0300)
commit167767a775f3db5cd94053d4da6a4f419b6211cd
tree8fb01c147d8cae2bb6c5bf041a985e102d81f37b
parentd36b8414bdde1f361c40e6f6d53788c43ffe53c1
SpeculativeExecution: Fix for logic change introduced in D81730.

Summary:
The test case started to hoist bitcasts to upper BB after D81730.
Reverted unintentional logic change. Some instructions may have zero cost but
will not be hoisted by different limitation so should be counted for threshold.

Reviewers: aprantl, arsenm, nhaehnle

Reviewed By: aprantl

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82761
llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
llvm/test/Transforms/SpeculativeExecution/PR46267.ll