On Thu, Oct 17, 2013 at 10:43 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > In little endian mode, we managed to convert a load of the V4SI vector > {3, 3, 3, 7} into a vspltisw of 3, apparently taking offense at the > number 7. It turns out we only looked at the first N-1 elements of an > N-element vector in little endian mode, and verified the zeroth element > twice. Adjusting the loop boundaries fixes the problem. > > Currently bootstrapping for powerpc64{,le}-unknown-linux-gnu. Ok to > commit to trunk if no regressions?
This patch does not make sense. It biases the loop bounds based on BYTES_BIG_ENDIAN, but the body of the loop biases the index variable based on BYTES_BIG_ENDIAN in one of the two uses. The changes seem to compute the same value for the first use of index "i" for both BYTES_BIG_ENDIAN and !BYTES_BIG_ENDIAN in a convoluted way. It looks like something should be able to be simplified. Thanks, David