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: http://review.tizen.org/git/?a=commitdiff_plain;h=aac265cc7818840c116316c14a42fab6ba59d10a;p=platform%2Fupstream%2Fllvm.git OpenCL: Fix vector conditional operator CodeGen for the case where the operands are vectors of doubles. llvm-svn: 157596 --- diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index bce910c..f8b4c08 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/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;