FAIL: gcc.target/powerpc/fold-vec-splat-floatdouble.c scan-assembler-times xxpermdi 3 This is one of those tests that just counts assembler instructions and the count of xxpermdi changed seurer@makalu-lp1:~/gcc/build/gcc-test2$ diff fold-vec-splat-floatdouble.s.r278832 fold-vec-splat-floatdouble.s.r278833 94c94,95 < xxpermdi 34,34,34,0 --- > xxlor 0,34,34 > xxpermdi 34,0,0,0 113c114,115 < xxpermdi 34,34,34,3 --- > xxpermdi 0,34,34,2 > xxpermdi 34,0,0,0 which in this case looks like missed optimization given the extra instructions are just copying things needlessly between registers.
OK, so the testcases look like testf_00 (__vector float x) { vector(4) int _1; vector(4) int _2; int _4; __vector float _5; <bb 2> : _1 = VIEW_CONVERT_EXPR<__vector signed int>(x_3(D)); _4 = BIT_FIELD_REF <x_3(D), 32, 0>; _2 = {_4, _4, _4, _4}; _5 = VIEW_CONVERT_EXPR<__vector float>(_2); return _5; which we previously optimized to <bb 2> : _1 = VIEW_CONVERT_EXPR<__vector signed int>(x_3(D)); _4 = BIT_FIELD_REF <x_3(D), 32, 0>; _7 = VIEW_CONVERT_EXPR<vector(4) int>(x_3(D)); _8 = VEC_PERM_EXPR <_7, _7, { 0, 0, 0, 0 }>; _5 = VIEW_CONVERT_EXPR<__vector float>(_8); return _5; so power doesn't have a special splat instruction then it seems. I'll simply revert the change to not consider uniform vector CTORs.
Fixed.
Author: rguenth Date: Tue Dec 3 14:47:24 2019 New Revision: 278938 URL: https://gcc.gnu.org/viewcvs?rev=278938&root=gcc&view=rev Log: 2019-12-03 Richard Biener <rguenther@suse.de> PR tree-optimization/92758 * tree-ssa-forwprop.c (simplify_vector_constructor): Restore operation on uniform vectors. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-forwprop.c
OK, thanks. BTW, for reference this also affected a couple other test cases on LE power 8 and power 9. FAIL: gcc.target/powerpc/swaps-p8-16.c scan-assembler vspltw FAIL: gcc.target/powerpc/swaps-p8-27.c scan-assembler-times lxvd2x 2