diff options
author | Craig Topper <craig.topper@intel.com> | 2017-07-06 18:39:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-07-06 18:39:47 +0000 |
commit | 79ab643da842b03da893a0188426450525e6ada5 (patch) | |
tree | 6a1a91dac806eca4ea8b6b95373193626e0d94a6 /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | eb6d5d19508c5485aafb7f9a30dee819a3b64352 (diff) | |
download | bcm5719-llvm-79ab643da842b03da893a0188426450525e6ada5.tar.gz bcm5719-llvm-79ab643da842b03da893a0188426450525e6ada5.zip |
[Constants] If we already have a ConstantInt*, prefer to use isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI
Going through the Constant methods requires redetermining that the Constant is a ConstantInt and then calling isZero/isOne/isMinusOne.
llvm-svn: 307292
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 7eea44d6aca..184940b7ea5 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1230,7 +1230,7 @@ static void instrumentMaskedLoadOrStore(AddressSanitizer *Pass, if (auto *Vector = dyn_cast<ConstantVector>(Mask)) { // dyn_cast as we might get UndefValue if (auto *Masked = dyn_cast<ConstantInt>(Vector->getOperand(Idx))) { - if (Masked->isNullValue()) + if (Masked->isZero()) // Mask is constant false, so no instrumentation needed. continue; // If we have a true or undef value, fall through to doInstrumentAddress |