Big endian vector elements
t.p.northover at gmail.com
Mon Mar 3 07:21:10 PST 2014
What's LLVM's position on where element 0 exists when a vector is
stored on a big-endian machine? As far as I can see there are three
1. At the high address.
2. At the low address.
3. Target decision, no opts that depend on it happen.
I think there's code assuming both 1 and 2.:
1. In DAGCombiner.cpp, visitEXTRACT_VECTOR_ELT counts lanes backwards
for addressing purposes.
2. SROA converts the attached .ll file (union type-punning,
essentially) into an insertvector on element 1.
One of those has to be a bug (and the documentation should probably be
clarified), but I'm not sure which. Any hints?
More information about the llvm-commits