https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98221
Bug ID: 98221 Summary: [11 regression] Wrong unpack operation emitted in tree-ssa-forwprop.c Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: krebbel at gcc dot gnu.org Target Milestone: --- Created attachment 49728 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49728&action=edit Fix The vec-abi-varargs-1.c testcase on IBM Z currently fails. While adding an SI mode vector to a DI mode vector the first is unpacked using: _28 = BIT_INSERT_EXPR <{ 0, 0, 0, 0 }, _2, 0>; _34 = [vec_unpack_lo_expr] _28; However, on big endian targets lo refers to the right hand side of the vector - in this case the zeroes. This appears to be triggered with that patch: commit 78307657cf9675bc4aa2e77561c823834714b4c8 Author: Richard Biener <rguent...@suse.de> Date: Thu Nov 28 12:22:04 2019 +0000 re PR tree-optimization/92645 (Hand written vector code is 450 times slower when compiled with GCC compared to Clang) 2019-11-28 Richard Biener <rguent...@suse.de> PR tree-optimization/92645 * tree-ssa-forwprop.c (get_bit_field_ref_def): Also handle conversions inside a mode class. Remove restriction on preserving the element size. (simplify_vector_constructor): Deal with the above and for identity permutes also try using VEC_UNPACK_[FLOAT_]LO_EXPR and VEC_PACK_TRUNC_EXPR. * gcc.target/i386/pr92645-4.c: New testcase.