[llvm] r314613 - Fix typo [NFC]

Xin Tong via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 17:10:22 PDT 2017


I am reverting this. Incorrectly included some code when I am fixing a
typo.Sorry

On Sun, Oct 1, 2017 at 9:07 AM, Xin Tong via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: trentxintong
> Date: Sat Sep 30 17:07:24 2017
> New Revision: 314613
>
> URL: http://llvm.org/viewvc/llvm-project?rev=314613&view=rev
> Log:
> Fix typo [NFC]
>
> Modified:
>     llvm/trunk/lib/Analysis/ConstantFolding.cpp
>     llvm/trunk/test/CodeGen/X86/block-placement.ll
>
> Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
> Analysis/ConstantFolding.cpp?rev=314613&r1=314612&r2=314613&view=diff
> ============================================================
> ==================
> --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
> +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Sat Sep 30 17:07:24 2017
> @@ -1435,7 +1435,7 @@ bool llvm::canConstantFoldCallTo(Immutab
>      return Name == "fabs" || Name == "floor" || Name == "fmod" ||
>             Name == "fabsf" || Name == "floorf" || Name == "fmodf";
>    case 'l':
> -    return Name == "log" || Name == "log10" || Name == "logf" ||
> +    return Name == "log" || Name == "log10" || Name == "logf" || Name ==
> "loll" ||
>             Name == "log10f";
>    case 'p':
>      return Name == "pow" || Name == "powf";
> @@ -1492,7 +1492,9 @@ Constant *GetConstantFoldFPValue(double
>      return ConstantFP::get(Ty->getContext(), APFloat((float)V));
>    if (Ty->isDoubleTy())
>      return ConstantFP::get(Ty->getContext(), APFloat(V));
> -  llvm_unreachable("Can only constant fold half/float/double");
> +  if (Ty->isX86_FP80Ty())
> +    return ConstantFP::get(Ty->getContext(), APFloat(APFloat::x87DoubleExtended(),
> (long double)V));
> +  llvm_unreachable("Can only constant fold half/float/double/long
> double");
>  }
>
>  /// Clear the floating-point exception state.
> @@ -1602,7 +1604,7 @@ Constant *ConstantFoldScalarCall(StringR
>          return ConstantInt::get(Ty->getContext(), Val.bitcastToAPInt());
>        }
>
> -      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy())
> +      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy() &&
> !Ty->isX86_FP80Ty())
>          return nullptr;
>
>        if (IntrinsicID == Intrinsic::round) {
> @@ -1736,6 +1738,7 @@ Constant *ConstantFoldScalarCall(StringR
>        case 'l':
>          if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) ||
>              (Name == "logf" && V > 0 && TLI->has(LibFunc_logf)) ||
> +            (Name == "logl" && V > 0 && TLI->has(LibFunc_logl)) ||
>              (Name == "__log_finite" && V > 0 &&
>                TLI->has(LibFunc_log_finite)) ||
>              (Name == "__logf_finite" && V > 0 &&
>
> Modified: llvm/trunk/test/CodeGen/X86/block-placement.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/
> CodeGen/X86/block-placement.ll?rev=314613&r1=314612&r2=314613&view=diff
> ============================================================
> ==================
> --- llvm/trunk/test/CodeGen/X86/block-placement.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/block-placement.ll Sat Sep 30 17:07:24
> 2017
> @@ -943,7 +943,7 @@ define void @benchmark_heapsort(i32 %n,
>  ; 2) The exiting edge from the loop which is rotated to be laid out at the
>  ;    bottom of the loop needs to be exiting into the nearest enclosing
> loop (to
>  ;    which there is an exit). Otherwise, we force that enclosing loop into
> -;    strange layouts that are siginificantly less efficient, often times
> maing
> +;    strange layouts that are siginificantly less efficient, often times
> making
>  ;    it discontiguous.
>  ;
>  ; CHECK-LABEL: @benchmark_heapsort
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
Software Engineer - Compiler Toolchain
Employee of Facebook Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171001/c88f4614/attachment.html>


More information about the llvm-commits mailing list