On Sat, Jun 27, 2009 at 6:24 PM, Nate Begeman<[email protected]> wrote: > > On Jun 27, 2009, at 8:07 PM, Eli Friedman wrote: > >> On Fri, Jun 26, 2009 at 11:22 AM, Nate Begeman<[email protected]> wrote: >>> >>> - return APValue(); >>> + if (Result.isInt() || Result.isFloat()) { >>> + unsigned NumElts = >>> E->getType()->getAsVectorType()->getNumElements(); >>> + llvm::SmallVector<APValue, 4> Elts(NumElts, Result); >>> + Result = APValue(&Elts[0], Elts.size()); >>> + } >>> + return Result; >>> } >> >> Is there a missing conversion from the scalar type of the result to >> the element type of the vector? > > Not sure; empirically it seems to work as expected, but I'll write some > explicit tests for edge cases and try it out.
Try clang-cc -emit-llvm on the following: typedef float f2 __attribute((ext_vector_type(2))); f2 a = (f2)5; -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
