From: Peter Collingbourne Date: Tue, 29 May 2012 00:35:18 +0000 (+0000) Subject: OpenCL: Fix vector conditional operator CodeGen for the case where X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=565204db54a61beacef4eb7a55cfead81ad58834;p=clang OpenCL: Fix vector conditional operator CodeGen for the case where the operands are vectors of doubles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157596 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index bce910ce18..f8b4c0832c 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -2593,7 +2593,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { llvm::Value *LHSTmp = LHS; bool wasCast = false; llvm::VectorType *rhsVTy = cast(RHS->getType()); - if (rhsVTy->getElementType()->isFloatTy()) { + if (rhsVTy->getElementType()->isFloatingPointTy()) { RHSTmp = Builder.CreateBitCast(RHS, tmp2->getType()); LHSTmp = Builder.CreateBitCast(LHS, tmp->getType()); wasCast = true;