[llvm] 934ba0d - [InstCombine] Handle missing cases in `visitFCmpInst`

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 08:19:48 PST 2024


Author: Yingwei Zheng
Date: 2024-02-08T00:15:32+08:00
New Revision: 934ba0d59e650644fe69462935982318b265ad2c

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

LOG: [InstCombine] Handle missing cases in `visitFCmpInst`

Fiix buildbot failures.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index f243f553a6732..7aac13fd474b2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -7767,6 +7767,8 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
   const APFloat *C;
   if (match(Op1, m_APFloat(C)) && C->isInfinity()) {
     switch (C->isNegative() ? FCmpInst::getSwappedPredicate(Pred) : Pred) {
+    default:
+      break;
     case FCmpInst::FCMP_ORD:
     case FCmpInst::FCMP_UNO:
     case FCmpInst::FCMP_TRUE:


        


More information about the llvm-commits mailing list