With these first experiments, I see:
- Clang seems to now emit a padding in the case of no-vx, like
%struct.S = type { i32, [12 x i8], <4 x i32> }
instead of
%struct.S = type { i32, <4 x i32> }
This should be equivalent, in the final output, I would hope, although I have not looked into that handling in detail.
- As seen in function-attributes-01.ll, if the IR has no alignment specified, it is 8-byte aligned now even with -vector.
- vec-abi-align.ll needed updating to include the padding in the struct - as now expected from clang - to work...
It seems that SPEC builds identically both for z15 and zEC12, which is promising. I however don't quite know if this is actually correct or not: what if some optimizer want to build a vector and adds the wrong alignment in the no-vx case? Is the alignment as specified by the front end and found in the I/R enough to make this work in all cases? I am a little worried that some optimizer might look up that alignment value in DataLayout and use that instead...
We should remove the CPU and FS arguments here, to make it obvious that the data layout should depend *only* on the Triple.