]> granicus.if.org Git - clang/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157596 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprScalar.cpp

index bce910ce189c07af9f2986c2b52b614b1e927a62..f8b4c0832c30b2004a43ae391c4ca1047fed6f50 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;