On Nov 16, 2007, at 7:58 PM, Nate Begeman wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=44204&view=rev > Log: > Add support for vectors to int <-> float casts.
Hey Nate, Very nice! Two further requests :) > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/Feature/newcasts.ll (original) > +++ llvm/trunk/test/Feature/newcasts.ll Fri Nov 16 21:58:34 2007 > @@ -15,6 +15,11 @@ > %k = bitcast i32 %a to float > %l = inttoptr i16 %x to i32* > %m = ptrtoint i32* %l to i64 > + %n = insertelement <4 x i32> undef, i32 %a, i32 0 > + %o = sitofp <4 x i32> %n to <4 x float> > + %p = uitofp <4 x i32> %n to <4 x float> > + %q = fptosi <4 x float> %p to <4 x i32> > + %r = fptoui <4 x float> %p to <4 x i32> > ret void > } Please also add an X86 codegen test for the new instructions you added. Also, do we need legalizer support to turn vector uint_to_fp into sint_to_fp on targets that don't support it? What happens now if you use uint_to_fp on x86 for example? -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits