Skip to content

Commit

Permalink
XXX disable complex number builtin only on kernel compilation path
Browse files Browse the repository at this point in the history
  • Loading branch information
whchung authored and scchan committed Jun 27, 2017
1 parent 707070d commit 540c9ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/CodeGen/CGExprComplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo &Op) {
Value *ResR, *ResI;
llvm::MDBuilder MDHelper(CGF.getLLVMContext());

// XXX disable complex number builtin for now
if (false && Op.LHS.first->getType()->isFloatingPointTy()) {
// XXX disable complex number builtin for kernel compilation path for now
if (!CGF.CGM.getLangOpts().DevicePath && Op.LHS.first->getType()->isFloatingPointTy()) {
// The general formulation is:
// (a + ib) * (c + id) = (a * c - b * d) + i(a * d + b * c)
//
Expand Down Expand Up @@ -753,8 +753,8 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) {


llvm::Value *DSTr, *DSTi;
// XXX disable complex number builtin for now
if (false && LHSr->getType()->isFloatingPointTy()) {
// XXX disable complex number builtin for kernel compilation path for now
if (!CGF.CGM.getLangOpts().DevicePath && LHSr->getType()->isFloatingPointTy()) {
// If we have a complex operand on the RHS, we delegate to a libcall to
// handle all of the complexities and minimize underflow/overflow cases.
//
Expand Down

0 comments on commit 540c9ca

Please sign in to comment.