[llvm-commits] PATCH: remove VICmp and VFCmp.

Duncan Sands baldrick at free.fr
Fri Jul 10 02:33:09 PDT 2009


Hi Eli,

>>> So what's the alternative?  Bitcast to i8 and then store?
>> I don't think bitcasting to i8 will be possible: lots of places
>> "know" that bitcast is the same as "store as first type, load
>> as the other".  If <8 x i1> doesn't store like i8 then allowing
>> bitcast would break this invariant.  I don't think that's wise.
> 
> Mmm, right... that's nasty.  But we also can't just make bitcasting
> to/from vector types illegal; a lot of existing code depends on that.

I'm not suggesting making bitcast illegal.  I'm saying that bitcast
between a vector and some other type should be legal exactly when
TargetData's getTypeSizeInBits is the same for both.  Thus it would
be legal to bitcast a <8 x i1> to an i64, since they would both be
64 bits long.  Likewise <4 x i32> to <2 x i64> would be ok.  However
you would no longer be able to bitcast <8 x i1> to i8.

Ciao,

Duncan.



More information about the llvm-commits mailing list