As we currently have it implemented in altivec.h, the offsets for these two intrinsics are element offsets. The documentation in the ABI (as well as the implementation in both XL and GCC) states that these should be byte offsets.
A few questions.
Why we name it Adjusted? Why not just __addr?
Why we want to cast it to (signed short *) again? Looks like unnecessary casting to me?
Any difference for results without power8-vector , except for test9 and test10?
Why not split test9 and test10 to another file for simplicity?
Sure. I don't really have any preference with respect to the name at all.
Argh, yup the double cast is silly. I initially did something different for this and just missed cleaning up these. I'll update.
I like running all of them both with and without power8-vector. I can simplify this by using check-prefixes=CHECK,CHECK-P8 so that we only have one sequence of checks for each function.