]> granicus.if.org Git - llvm/commitdiff
[ConstantFolding][X86] Replace an LLVM_FALLTHROUGH with a break because it really...
authorCraig Topper <craig.topper@gmail.com>
Sun, 4 Jun 2017 08:21:51 +0000 (08:21 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 4 Jun 2017 08:21:51 +0000 (08:21 +0000)
This is actually NFC because the next case starts with the same if statement as this case did. So the result will be the same and it will fallthrough to the end of the switch. But there's no reason to rely on that so we should just break.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ConstantFolding.cpp

index b8e80eaedd9ebd21ec6a95f68096b030a1fec607..4267ed24e9f9eb02fef0ec28913f005560685126 100644 (file)
@@ -1815,7 +1815,7 @@ Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, Type *Ty,
                 dyn_cast_or_null<ConstantFP>(Op->getAggregateElement(0U)))
           return ConstantFoldSSEConvertToInt(FPOp->getValueAPF(),
                                              /*roundTowardZero=*/false, Ty);
-        LLVM_FALLTHROUGH;
+        break;
       case Intrinsic::x86_sse_cvttss2si:
       case Intrinsic::x86_sse_cvttss2si64:
       case Intrinsic::x86_sse2_cvttsd2si:
@@ -1824,6 +1824,7 @@ Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, Type *Ty,
                 dyn_cast_or_null<ConstantFP>(Op->getAggregateElement(0U)))
           return ConstantFoldSSEConvertToInt(FPOp->getValueAPF(),
                                              /*roundTowardZero=*/true, Ty);
+        break;
       }
     }