<div dir="ltr">I am reverting this. Incorrectly included some code when I am fixing a typo.Sorry</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 1, 2017 at 9:07 AM, Xin Tong 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: trentxintong<br>
Date: Sat Sep 30 17:07:24 2017<br>
New Revision: 314613<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=314613&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=314613&view=rev</a><br>
Log:<br>
Fix typo [NFC]<br>
<br>
Modified:<br>
    llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp<br>
    llvm/trunk/test/CodeGen/X86/<wbr>block-placement.ll<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=314613&r1=314612&r2=314613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/<wbr>Analysis/ConstantFolding.cpp?<wbr>rev=314613&r1=314612&r2=<wbr>314613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/<wbr>ConstantFolding.cpp Sat Sep 30 17:07:24 2017<br>
@@ -1435,7 +1435,7 @@ bool llvm::canConstantFoldCallTo(<wbr>Immutab<br>
     return Name == "fabs" || Name == "floor" || Name == "fmod" ||<br>
            Name == "fabsf" || Name == "floorf" || Name == "fmodf";<br>
   case 'l':<br>
-    return Name == "log" || Name == "log10" || Name == "logf" ||<br>
+    return Name == "log" || Name == "log10" || Name == "logf" || Name == "loll" ||<br>
            Name == "log10f";<br>
   case 'p':<br>
     return Name == "pow" || Name == "powf";<br>
@@ -1492,7 +1492,9 @@ Constant *GetConstantFoldFPValue(double<br>
     return ConstantFP::get(Ty-><wbr>getContext(), APFloat((float)V));<br>
   if (Ty->isDoubleTy())<br>
     return ConstantFP::get(Ty-><wbr>getContext(), APFloat(V));<br>
-  llvm_unreachable("Can only constant fold half/float/double");<br>
+  if (Ty->isX86_FP80Ty())<br>
+    return ConstantFP::get(Ty-><wbr>getContext(), APFloat(APFloat::<wbr>x87DoubleExtended(), (long double)V));<br>
+  llvm_unreachable("Can only constant fold half/float/double/long double");<br>
 }<br>
<br>
 /// Clear the floating-point exception state.<br>
@@ -1602,7 +1604,7 @@ Constant *ConstantFoldScalarCall(<wbr>StringR<br>
         return ConstantInt::get(Ty-><wbr>getContext(), Val.bitcastToAPInt());<br>
       }<br>
<br>
-      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy())<br>
+      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy() && !Ty->isX86_FP80Ty())<br>
         return nullptr;<br>
<br>
       if (IntrinsicID == Intrinsic::round) {<br>
@@ -1736,6 +1738,7 @@ Constant *ConstantFoldScalarCall(<wbr>StringR<br>
       case 'l':<br>
         if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) ||<br>
             (Name == "logf" && V > 0 && TLI->has(LibFunc_logf)) ||<br>
+            (Name == "logl" && V > 0 && TLI->has(LibFunc_logl)) ||<br>
             (Name == "__log_finite" && V > 0 &&<br>
               TLI->has(LibFunc_log_finite)) ||<br>
             (Name == "__logf_finite" && V > 0 &&<br>
<br>
Modified: llvm/trunk/test/CodeGen/X86/<wbr>block-placement.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/block-placement.ll?rev=314613&r1=314612&r2=314613&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/X86/block-placement.<wbr>ll?rev=314613&r1=314612&r2=<wbr>314613&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/X86/<wbr>block-placement.ll (original)<br>
+++ llvm/trunk/test/CodeGen/X86/<wbr>block-placement.ll Sat Sep 30 17:07:24 2017<br>
@@ -943,7 +943,7 @@ define void @benchmark_heapsort(i32 %n,<br>
 ; 2) The exiting edge from the loop which is rotated to be laid out at the<br>
 ;    bottom of the loop needs to be exiting into the nearest enclosing loop (to<br>
 ;    which there is an exit). Otherwise, we force that enclosing loop into<br>
-;    strange layouts that are siginificantly less efficient, often times maing<br>
+;    strange layouts that are siginificantly less efficient, often times making<br>
 ;    it discontiguous.<br>
 ;<br>
 ; CHECK-LABEL: @benchmark_heapsort<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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Software Engineer - Compiler Toolchain<br>Employee of Facebook Inc.</div>
</div>