On Fri, 2011-03-11 at 12:34 -0600, Peter Bergner wrote: > This patch fixes the two related bugs in PR48053. The problem here deals > with loading constants into VSX registers. The first bug occurs when we > try and load up a full constant into the VSX register. We end up calling > easy_vector_constant_msb which is supported only for V4SI and V4SF modes. > The fix here was to modify the easy_vector_constant_msb predicate to > reject V2DI and V2DF modes. > > The second bug was when we attempt to load a VSX register with a constant > for one half of the register and a variable for the other half. This > caused an ICE in int_mode_for_mode. I fixed this by first forcing the > correct scalar mode in rs6000_expand_vector_init() and then adding > special support in the movdi_internal* patterns to allow setting of > VSX registers to zero. > > These fixed both test cases in PR48053 and Pat Haugen verified that > they fixed the SPEC benchmarks the test cases were reduced from, > without introducing any new SPEC regressions.
I should mention, the first bug was exposed by Mike's recent fix for PR47755. The second was introduced with revision 150271, which was Mike's initial POWER7 VSX support. Peter