From aac265cc7818840c116316c14a42fab6ba59d10a Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Tue, 29 May 2012 00:35:18 +0000 Subject: [PATCH] OpenCL: Fix vector conditional operator CodeGen for the case where the operands are vectors of doubles. llvm-svn: 157596 --- clang/lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4