r336628 - [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 17:50:03 PDT 2018


Author: ctopper
Date: Mon Jul  9 17:50:03 2018
New Revision: 336628

URL: http://llvm.org/viewvc/llvm-project?rev=336628&view=rev
Log:
[X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask.

Modified:
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=336628&r1=336627&r2=336628&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Mon Jul  9 17:50:03 2018
@@ -10068,30 +10068,6 @@ Value *CodeGenFunction::EmitX86BuiltinEx
   case X86::BI__builtin_ia32_pternlogq256_maskz:
     return EmitX86Ternlog(*this, /*ZeroMask*/true, Ops);
 
-  case X86::BI__builtin_ia32_divss_round_mask:
-  case X86::BI__builtin_ia32_divsd_round_mask: {
-    Intrinsic::ID ID;
-    switch (BuiltinID) {
-    default: llvm_unreachable("Unsupported intrinsic!");
-    case X86::BI__builtin_ia32_divss_round_mask:
-      ID = Intrinsic::x86_avx512_mask_div_ss_round; break;
-    case X86::BI__builtin_ia32_divsd_round_mask:
-      ID = Intrinsic::x86_avx512_mask_div_sd_round; break;
-    }
-    Function *Intr = CGM.getIntrinsic(ID);
-
-    // If round parameter is not _MM_FROUND_CUR_DIRECTION, don't lower.
-    if (cast<llvm::ConstantInt>(Ops[4])->getZExtValue() != (uint64_t)4)
-      return Builder.CreateCall(Intr, Ops);
-
-    Value *A = Builder.CreateExtractElement(Ops[0], (uint64_t)0);
-    Value *B = Builder.CreateExtractElement(Ops[1], (uint64_t)0);
-    Value *C = Builder.CreateExtractElement(Ops[2], (uint64_t)0);
-    Value *Div = Builder.CreateFDiv(A, B);
-    Div = EmitX86ScalarSelect(*this, Ops[3], Div, C);
-    return Builder.CreateInsertElement(Ops[0], Div, (uint64_t)0);
-  }
-
   // 3DNow!
   case X86::BI__builtin_ia32_pswapdsf:
   case X86::BI__builtin_ia32_pswapdsi: {




More information about the cfe-commits mailing list