[llvm] c635ea5 - [CombinerHelper] Avoid deprecated method (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 07:09:29 PDT 2022


Author: Nikita Popov
Date: 2022-09-01T16:09:05+02:00
New Revision: c635ea5c5009635f389399acc4a0f9b6f9799d1f

URL: https://github.com/llvm/llvm-project/commit/c635ea5c5009635f389399acc4a0f9b6f9799d1f
DIFF: https://github.com/llvm/llvm-project/commit/c635ea5c5009635f389399acc4a0f9b6f9799d1f.diff

LOG: [CombinerHelper] Avoid deprecated method (NFC)

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
index 84a6feaa6513..32cb96e7d61e 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<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.


        


More information about the llvm-commits mailing list