[LLVMdev] vector type legalization

Redmond, Paul paul.redmond at intel.com
Mon Aug 12 08:40:28 PDT 2013


Hi,

I am trying to understand how vector type legalization works. In particular, I'm looking at i8 vector types on x86 (with sse42 features)

v3i8 gets widened to v4i8 and then operations get unrolled (scalarized) because v4i8 is not a legal type whereas v4i8 gets promoted to v4i32. Why doesn't v3i8 (or even v4i8) get widened to v16i8? Alternatively, v3i8 could be widened to v4i8 then promoted to v4i32 but this doesn't happen either.

Can anyone provide some insight into why vector type legalization works the way it does?

Thanks,
paul




More information about the llvm-dev mailing list