diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp index e2976ace3a4a..1c8e4e3512dc 100644 --- a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp @@ -35,6 +35,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include <cassert> +#include <optional> using namespace llvm; @@ -656,7 +657,7 @@ static void scalarizeMaskedExpandLoad(const DataLayout &DL, CallInst *CI, // shuffle blend with the pass through value. if (isConstantIntVector(Mask)) { unsigned MemIndex = 0; - VResult = UndefValue::get(VecType); + VResult = PoisonValue::get(VecType); SmallVector<int, 16> ShuffleMask(VectorWidth, UndefMaskElem); for (unsigned Idx = 0; Idx < VectorWidth; ++Idx) { Value *InsertElt; @@ -861,7 +862,7 @@ static void scalarizeMaskedCompressStore(const DataLayout &DL, CallInst *CI, static bool runImpl(Function &F, const TargetTransformInfo &TTI, DominatorTree *DT) { - Optional<DomTreeUpdater> DTU; + std::optional<DomTreeUpdater> DTU; if (DT) DTU.emplace(DT, DomTreeUpdater::UpdateStrategy::Lazy); @@ -873,7 +874,7 @@ static bool runImpl(Function &F, const TargetTransformInfo &TTI, for (BasicBlock &BB : llvm::make_early_inc_range(F)) { bool ModifiedDTOnIteration = false; MadeChange |= optimizeBlock(BB, ModifiedDTOnIteration, TTI, DL, - DTU ? DTU.getPointer() : nullptr); + DTU ? &*DTU : nullptr); // Restart BB iteration if the dominator tree of the Function was changed if (ModifiedDTOnIteration) |