From 230a7b7374339b1f6a136a20416bb4bf9c437d1f Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 14 Sep 2012 14:23:05 -0700 Subject: [PATCH] Fix bug with floating-point constant zero vectors. Issue #377. --- llvmutil.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvmutil.cpp b/llvmutil.cpp index cc8ac5af..d0c694ff 100644 --- a/llvmutil.cpp +++ b/llvmutil.cpp @@ -1399,8 +1399,7 @@ lExtractFirstVectorElement(llvm::Value *v, // First, handle various constant types; do the extraction manually, as // appropriate. if (llvm::isa(v) == true) { - Assert(vt->getElementType()->isIntegerTy()); - return llvm::ConstantInt::get(vt->getElementType(), 0); + return llvm::Constant::getNullValue(vt->getElementType()); } if (llvm::ConstantVector *cv = llvm::dyn_cast(v)) { #ifndef LLVM_3_0