tree-optimization/98221 - fix wrong unpack operation used for big-endian
authorAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 11 Jan 2021 09:59:43 +0000 (10:59 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 11 Jan 2021 10:46:31 +0000 (11:46 +0100)
commit300a3ce5c5695eb1a7c0476e9d1b45420a463248
treea16eee1a253605fa99a03098828223be1801e9f8
parent0c18faac3fb407d182dfa82426d1be7cce587926
tree-optimization/98221 - fix wrong unpack operation used for big-endian

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.

2021-01-11  Andreas Krebbel  <krebbel@linux.ibm.com>

* tree-ssa-forwprop.c (simplify_vector_constructor): For
big-endian, use UNPACK[_FLOAT]_HI.
gcc/tree-ssa-forwprop.c