From c635ea5c5009635f389399acc4a0f9b6f9799d1f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Sep 2022 16:09:05 +0200 Subject: [PATCH] [CombinerHelper] Avoid deprecated method (NFC) --- llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp index 84a6fea..32cb96e 100644 --- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp @@ -4986,7 +4986,7 @@ MachineInstr *CombinerHelper::buildSDivUsingMul(MachineInstr &MI) { SmallVector Shifts, Factors; auto *RHSDef = cast(getDefIgnoringCopies(RHS, MRI)); - bool IsSplat = getIConstantSplatVal(*RHSDef, MRI).hasValue(); + bool IsSplat = getIConstantSplatVal(*RHSDef, MRI).has_value(); auto BuildSDIVPattern = [&](const Constant *C) { // Don't recompute inverses for each splat element. -- 2.7.4