OSDN Git Service

[ValueTracking] Simplify the known bits code for constant vectors a little.
authorCraig Topper <craig.topper@intel.com>
Sat, 21 Oct 2017 16:35:39 +0000 (16:35 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 21 Oct 2017 16:35:39 +0000 (16:35 +0000)
commit3afd582859003b645e0d806a8f32cbebe780f69f
tree317809d0a767caa6b5649547a62edfcc7e870873
parent3aad6fd98b60114347bcfdeaeded7987ec5b629e
[ValueTracking] Simplify the known bits code for constant vectors a little.

Neither of these cases really require a temporary APInt outside the loop. For the ConstantDataSequential case the APInt will never be larger than 64-bits so its fine to just call getElementAsAPInt. For ConstantVector we can get the APInt by reference and only make a copy where the inversion is needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316265 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp