[CombinerHelper] Avoid deprecated method (NFC)
authorNikita Popov <npopov@redhat.com>
Thu, 1 Sep 2022 14:09:05 +0000 (16:09 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 1 Sep 2022 14:09:05 +0000 (16:09 +0200)
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

index 84a6fea..32cb96e 100644 (file)
@@ -4986,7 +4986,7 @@ MachineInstr *CombinerHelper::buildSDivUsingMul(MachineInstr &MI) {
   SmallVector<Register, 16> Shifts, Factors;
 
   auto *RHSDef = cast<GenericMachineInstr>(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.