From: Craig Topper Date: Tue, 10 Jul 2018 00:50:03 +0000 (+0000) Subject: [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_d... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1faf953d7513154002a1b075cc308ec7fc301cff;p=platform%2Fupstream%2Fllvm.git [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask. llvm-svn: 336628 --- diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index ba0519b..ad98337 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -10068,30 +10068,6 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID, 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(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: {