]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Use rs6000_emit_move in movmisalign<mode> expander [PR104681]
authorJakub Jelinek <jakub@redhat.com>
Fri, 25 Feb 2022 17:58:48 +0000 (18:58 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 11 May 2022 06:17:56 +0000 (08:17 +0200)
commit5c742d9a7e217746de961da20a39f04e5ec1df25
treebb83b16ec5c7c9446b40fc9c5bad21bb69dd106e
parentff9fe8ef031ed29247b283201f6cfcf729502e11
rs6000: Use rs6000_emit_move in movmisalign<mode> expander [PR104681]

The following testcase ICEs, because for some strange reason it decides to use
movmisaligntf during expansion where the destination is MEM and source is
CONST_DOUBLE.  For normal mov<mode> expanders the rs6000 backend uses
rs6000_emit_move to ensure that if one operand is a MEM, the other is a REG
and a few other things, but for movmisalign<mode> nothing enforced this.
The middle-end documents that movmisalign<mode> shouldn't fail, so we can't
force that through predicates or condition on the expander.

2022-02-25  Jakub Jelinek  <jakub@redhat.com>

PR target/104681
* config/rs6000/vector.md (movmisalign<mode>): Use rs6000_emit_move.

* g++.dg/opt/pr104681.C: New test.

(cherry picked from commit 3885a122f817a1b6dca4a84ba9e020d5ab2060af)
gcc/config/rs6000/vector.md
gcc/testsuite/g++.dg/opt/pr104681.C [new file with mode: 0644]