On 12/11/2015 10:02 AM, Eric Botcazou wrote:
Hi,
this is the regression of c-c++-common/opaque-vector.c on 32-bit targets where
'long double' is 128-bit large, for example PowerPC and SPARC, with an ICE in
the RTL expander because emit_store_flag is invoked with TImode.
As noted by Ilya, the underlying issue (ICE because emit_store_flag is invoked
with TImode) is not a regression, but the test now runs into it because the
veclower pass generates:
int128_t _15;
<unnamed type> _16;
_15 = BIT_FIELD_REF <_14, 128, 0>;
_16 = _15 != 0;
_17 = _16 ? s.0_4 : s.1_6;
The problematic line is the second one: it's a store flag for int128_t.
Now the veclower pass also generates for the same testcase:
int128_t _12;
_12 = BIT_FIELD_REF <iv_1(D), 128, 0>;
_13 = _12 != 0 ? -1 : 0;
which works fine because the predicate is embedded in the condition.
That's why the attached patch changes the veclower pass to embed the predicate
in the former case too; this is sufficient to fix the regression.
Tested on x86-64/Linux and SPARC/Solaris, OK for the mainline?
2015-12-11 Eric Botcazou <ebotca...@adacore.com>
PR middle-end/68215
* tree-vect-generic.c (tree_vec_extract): Remove GSI parameter.
Do not gimplify the result.
(do_unop): Adjust call to tree_vec_extract.
(do_binop): Likewise.
(do_compare): Likewise.
(do_plus_minus): Likewise.
(do_negate): Likewise.
(expand_vector_condition): Likewise.
(do_cond): Likewise.
Presumably we know the code we're generating here is always gimple.
OK for the trunk.
jeff