OSDN Git Service

Revert "Fix typo [NFC]"
authorXin Tong <trent.xin.tong@gmail.com>
Sun, 1 Oct 2017 00:09:53 +0000 (00:09 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Sun, 1 Oct 2017 00:09:53 +0000 (00:09 +0000)
This reverts commit e60b5028619be1c81bd039d63a0627dac32d38f9.

Incorrectly include changes that are not typo fix.

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

lib/Analysis/ConstantFolding.cpp
test/CodeGen/X86/block-placement.ll

index ea673da..e88b8f1 100644 (file)
@@ -1435,7 +1435,7 @@ bool llvm::canConstantFoldCallTo(ImmutableCallSite CS, const Function *F) {
     return Name == "fabs" || Name == "floor" || Name == "fmod" ||
            Name == "fabsf" || Name == "floorf" || Name == "fmodf";
   case 'l':
-    return Name == "log" || Name == "log10" || Name == "logf" || Name == "loll" ||
+    return Name == "log" || Name == "log10" || Name == "logf" ||
            Name == "log10f";
   case 'p':
     return Name == "pow" || Name == "powf";
@@ -1492,9 +1492,7 @@ Constant *GetConstantFoldFPValue(double V, Type *Ty) {
     return ConstantFP::get(Ty->getContext(), APFloat((float)V));
   if (Ty->isDoubleTy())
     return ConstantFP::get(Ty->getContext(), APFloat(V));
-  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");
+  llvm_unreachable("Can only constant fold half/float/double");
 }
 
 /// Clear the floating-point exception state.
@@ -1604,7 +1602,7 @@ Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, Type *Ty,
         return ConstantInt::get(Ty->getContext(), Val.bitcastToAPInt());
       }
 
-      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy() && !Ty->isX86_FP80Ty())
+      if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy())
         return nullptr;
 
       if (IntrinsicID == Intrinsic::round) {
@@ -1738,7 +1736,6 @@ Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, Type *Ty,
       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 &&
index d494889..b3f6534 100644 (file)
@@ -943,7 +943,7 @@ define void @benchmark_heapsort(i32 %n, double* nocapture %ra) {
 ; 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 making
+;    strange layouts that are siginificantly less efficient, often times maing
 ;    it discontiguous.
 ;
 ; CHECK-LABEL: @benchmark_heapsort