https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121772

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |tree-optimization

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alice Carlotti from comment #1)
> Is the issue that you can't use a vector constructor to directly concatenate
> two vectors in GIMPLE? That is, the following is invalid:
> 
> _7 = {b_5(D), { 0, 0, 0, 0 }}
> 
> 
> If so, then what's the canonical way to represent vector concatenation in
> GIMPLE? VEC_PERM_EXPR?

No that is correct.

The problem is:
```
  _7 = {b_5(D), { 0, 0, 0, 0 }};
  _8 = .REDUC_PLUS (_7);
is not doing the correct thing:
Applying pattern match.pd:11055, gimple-match-4.cc:7859
gimple_simplified to _8 = b_5(D);
Removing dead stmt:_7 = {b_5(D), { 0, 0, 0, 0 }};
```

The match pattern:
```
/* Fold reduction of a single nonzero element constructor.  */
(for reduc (IFN_REDUC_PLUS IFN_REDUC_IOR IFN_REDUC_XOR)
  (simplify (reduc (CONSTRUCTOR@0))
    (with { tree ctor = (TREE_CODE (@0) == SSA_NAME
                         ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (@0)) : @0);
            tree elt = ctor_single_nonzero_element (ctor); }
      (if (elt
           && !HONOR_SNANS (type)
           && !HONOR_SIGNED_ZEROS (type))
        { elt; }))))

```

There is no types matching in this match pattern. 

Which means it started really with r12-7326-g2ef0e75d0bbc80 .

Reply via email to