I was happily going to close PR 55549, but it looks like we are trying the
same transformation in a second place in that file :-(
On Mon, 11 Dec 2017, James Greenhalgh wrote:
Hi,
In simplify_set we try transforming the paradoxical subreg expression:
(set FOO (subreg:M (mem:N BAR) 0))
in to:
(set FOO (zero_extend:M (mem:N BAR)))
However, this code does not consider the case where M is a vector
mode, allowing it to construct (for example):
(zero_extend:V4SI (mem:SI))
This would clearly have the wrong semantics, but fortunately we fail long
before then in expand_compound_operation. As we really don't want a vector
zero_extend of a scalar value.
We need to explicitly reject vector modes from this transformation.
This fixes a failure I'm seeing on a branch in which I'm trying to
tackle some performance regressions, so I have no live testcase for
this, but it is wrong by observation.
Tested on aarch64-none-elf and bootstrapped on aarch64-none-linux-gnu with
no issues.
OK?
Thanks,
James
---
2017-12-11 James Greenhalgh <james.greenha...@arm.com>
* combine.c (simplify_set): Do not transform subregs to zero_extends
if the destination mode is a vector mode.
--
Marc Glisse