<div dir="ltr">The second one here shouldn't have been a fallthrough. But the next case has the same 'if' as the first so it will also not return. So it isn't functionally wrong.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Wed, May 31, 2017 at 1:25 PM, Galina Kistanova via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gkistanova<br>
Date: Wed May 31 15:25:13 2017<br>
New Revision: 304340<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=304340&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=304340&view=rev</a><br>
Log:<br>
Added missing break; added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp<br>
<br>
Modified: llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=304340&r1=304339&r2=304340&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Analysis/ConstantFolding.cpp?<wbr>rev=304340&r1=304339&r2=<wbr>304340&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp Wed May 31 15:25:13 2017<br>
@@ -1739,6 +1739,7 @@ Constant *ConstantFoldScalarCall(<wbr>StringR<br>
         if ((Name == "round" && TLI->has(LibFunc_round)) ||<br>
             (Name == "roundf" && TLI->has(LibFunc_roundf)))<br>
           return ConstantFoldFP(round, V, Ty);<br>
+        break;<br>
       case 's':<br>
         if ((Name == "sin" && TLI->has(LibFunc_sin)) ||<br>
             (Name == "sinf" && TLI->has(LibFunc_sinf)))<br>
@@ -1807,6 +1808,7 @@ Constant *ConstantFoldScalarCall(<wbr>StringR<br>
                 dyn_cast_or_null<ConstantFP>(<wbr>Op->getAggregateElement(0U)))<br>
           return ConstantFoldSSEConvertToInt(<wbr>FPOp->getValueAPF(),<br>
                                              /*roundTowardZero=*/false, Ty);<br>
+        LLVM_FALLTHROUGH;<br>
       case Intrinsic::x86_sse_cvttss2si:<br>
       case Intrinsic::x86_sse_<wbr>cvttss2si64:<br>
       case Intrinsic::x86_sse2_cvttsd2si:<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>