OpenCL: Fix vector conditional operator CodeGen for the case where

the operands are vectors of doubles.

llvm-svn: 157596
This commit is contained in:
Peter Collingbourne 2012-05-29 00:35:18 +00:00
parent 6f154f16cd
commit aac265cc78
1 changed files with 1 additions and 1 deletions

View File

@ -2593,7 +2593,7 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) {
llvm::Value *LHSTmp = LHS;
bool wasCast = false;
llvm::VectorType *rhsVTy = cast<llvm::VectorType>(RHS->getType());
if (rhsVTy->getElementType()->isFloatTy()) {
if (rhsVTy->getElementType()->isFloatingPointTy()) {
RHSTmp = Builder.CreateBitCast(RHS, tmp2->getType());
LHSTmp = Builder.CreateBitCast(LHS, tmp->getType());
wasCast = true;