OpenCL: Fix vector conditional operator CodeGen for the case where
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 29 May 2012 00:35:18 +0000 (00:35 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 29 May 2012 00:35:18 +0000 (00:35 +0000)
the operands are vectors of doubles.

llvm-svn: 157596

clang/lib/CodeGen/CGExprScalar.cpp

index bce910c..f8b4c08 100644 (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;