public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
@ 2021-10-15  8:43 marxin at gcc dot gnu.org
  2021-10-15  8:51 ` [Bug target/102767] " marxin at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-15  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102767
           Summary: [12 Regression] ICE in
                    rs6000_builtin_vectorization_cost, at
                    config/rs6000/rs6000.c:5216
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: ppc64le-linux-gnu

The following ICEs:

$ cat ~/Programming/testcases/iso.f90
  INTERFACE
    FUNCTION elemental_mult(a, b,  C)
      type(*), DIMENSION(..) :: a, b, c
    END  
  END INTERFACE
   allocatable  z
  integer, dimension(2,2) :: a, b 
  call test_CFI_address
contains
  subroutine test_CFI_address
    if (elemental_mult (z, x, y) .ne. 0) stop 
    a = reshape ([4,3,2,1], [2,2])
    b = reshape ([2,3,4,5], [2,2])
    if (elemental_mult (i, a, b) .ne. 0) stop 
end  
  end

$ ppc64le-linux-gnu-gcc ~/Programming/testcases/iso.f90 -c
-mno-efficient-unaligned-vsx -O3
during GIMPLE pass: slp
/home/marxin/Programming/testcases/iso.f90:8:23:

    8 |   call test_CFI_address
      |                       ^
internal compiler error: in rs6000_builtin_vectorization_cost, at
config/rs6000/rs6000.c:5216
0x612d85 rs6000_builtin_vectorization_cost
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/rs6000.c:5216
0xe04a1b builtin_vectorization_cost
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.h:1520
0xe04a1b record_stmt_cost(vec<stmt_info_for_cost, va_heap, vl_ptr>*, int,
vect_cost_for_stmt, _stmt_vec_info*, tree_node*, int, vect_cost_model_location)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:109
0xe04f93 record_stmt_cost
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.h:1928
0xe04f93 vect_get_store_cost(vec_info*, _stmt_vec_info*, int, unsigned int*,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:1050
0xe05135 vect_model_store_cost
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:972
0xe1e21b vectorizable_store
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:7424
0xe2405f vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:10970
0xe5c463 vect_slp_analyze_node_operations_1
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4464
0xe5c463 vect_slp_analyze_node_operations
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4623
0xe5e6f3 vect_slp_analyze_operations(vec_info*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4862
0xe62656 vect_slp_analyze_bb_1
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:5802
0xe62656 vect_slp_region
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:5849
0xe64114 vect_slp_bbs
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:6041
0xe64375 vect_slp_function(function*)
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:6129
0xe6a07a execute
       
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.c:1456
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
@ 2021-10-15  8:51 ` marxin at gcc dot gnu.org
  2021-10-15  9:39 ` linkw at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-15  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
            Summary|[12 Regression] ICE in      |ICE in
                   |rs6000_builtin_vectorizatio |rs6000_builtin_vectorizatio
                   |n_cost, at                  |n_cost, at
                   |config/rs6000/rs6000.c:5216 |config/rs6000/rs6000.c:5216
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-15

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
It's something older, happens also with GCC 10.x.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
  2021-10-15  8:51 ` [Bug target/102767] " marxin at gcc dot gnu.org
@ 2021-10-15  9:39 ` linkw at gcc dot gnu.org
  2021-10-15 13:07 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-15  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |linkw at gcc dot gnu.org

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed, it's reproduced with latest trunk, but failed to reproduce with AT14
(gcc version 10.3.1 20210412) and one old trunk r12-3153. Suspected some recent
commit is problematic or get this exposed.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
  2021-10-15  8:51 ` [Bug target/102767] " marxin at gcc dot gnu.org
  2021-10-15  9:39 ` linkw at gcc dot gnu.org
@ 2021-10-15 13:07 ` rguenth at gcc dot gnu.org
  2021-10-15 13:31 ` linkw at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-15 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
           Keywords|                            |needs-bisection
             Status|NEW                         |ASSIGNED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I would guess it's my refactoring of alignment handling where we should have
rejected the store instead of trying to cost it (well, if the assert is
correct).

I will have a look but bisection would be nice.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-15 13:07 ` rguenth at gcc dot gnu.org
@ 2021-10-15 13:31 ` linkw at gcc dot gnu.org
  2021-10-15 15:51 ` rearnsha at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-15 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rearnsha at gcc dot gnu.org

--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
The bisection points to r12-3482.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-15 13:31 ` linkw at gcc dot gnu.org
@ 2021-10-15 15:51 ` rearnsha at gcc dot gnu.org
  2021-10-16  0:00 ` [Bug target/102767] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2021-10-15 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
We have the type 
<vector_type 0x7ffff758c9d8
    type <integer_type 0x7ffff7517bd0 public unsigned TI
        size <integer_cst 0x7ffff7514ee8 constant 128>
        unit-size <integer_cst 0x7ffff7514f00 constant 16>
and movmisalign pattern is enabled for this.

but the vectorization cost doesn't handle the case of elements=1, which is the
case when mode is TImode.

So I think this is an inconsistency in the rs6000 backend - either add costing
support for single elements or disable the movmisalign code in this case.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-10-15 15:51 ` rearnsha at gcc dot gnu.org
@ 2021-10-16  0:00 ` pinskia at gcc dot gnu.org
  2021-10-16 13:47 ` segher at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-16  0:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in                      |[12 Regression] ICE in
                   |rs6000_builtin_vectorizatio |rs6000_builtin_vectorizatio
                   |n_cost, at                  |n_cost, at
                   |config/rs6000/rs6000.c:5216 |config/rs6000/rs6000.c:5216
               Host|x86_64-linux-gnu            |
   Target Milestone|---                         |12.0
           Keywords|needs-bisection             |

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-10-16  0:00 ` [Bug target/102767] [12 Regression] " pinskia at gcc dot gnu.org
@ 2021-10-16 13:47 ` segher at gcc dot gnu.org
  2021-10-18  6:40 ` linkw at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: segher at gcc dot gnu.org @ 2021-10-16 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #5)
> We have the type 
> <vector_type 0x7ffff758c9d8
>     type <integer_type 0x7ffff7517bd0 public unsigned TI
>         size <integer_cst 0x7ffff7514ee8 constant 128>
>         unit-size <integer_cst 0x7ffff7514f00 constant 16>
> and movmisalign pattern is enabled for this.
> 
> but the vectorization cost doesn't handle the case of elements=1, which is
> the case when mode is TImode.
> 
> So I think this is an inconsistency in the rs6000 backend - either add
> costing support for single elements or disable the movmisalign code in this
> case.

But TImode is a scalar type, not a vector type, so it should hit one of the
early-outs at the top of rs6000_builtin_vectorization_cost?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-10-16 13:47 ` segher at gcc dot gnu.org
@ 2021-10-18  6:40 ` linkw at gcc dot gnu.org
  2021-10-18  7:25 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-18  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #6)
> (In reply to Richard Earnshaw from comment #5)
> > We have the type 
> > <vector_type 0x7ffff758c9d8
> >     type <integer_type 0x7ffff7517bd0 public unsigned TI
> >         size <integer_cst 0x7ffff7514ee8 constant 128>
> >         unit-size <integer_cst 0x7ffff7514f00 constant 16>
> > and movmisalign pattern is enabled for this.
> > 
> > but the vectorization cost doesn't handle the case of elements=1, which is
> > the case when mode is TImode.
> > 
> > So I think this is an inconsistency in the rs6000 backend - either add
> > costing support for single elements or disable the movmisalign code in this
> > case.
> 
> But TImode is a scalar type, not a vector type, so it should hit one of the
> early-outs at the top of rs6000_builtin_vectorization_cost?

for rs6000, the scalar type is uint128_t, the vectorized type is vector(1)
uint128_t

 <vector_type 0x7ffff51b5dd8
    type <integer_type 0x7ffff51b0bd0 public unsigned TI
        size <integer_cst 0x7ffff5180ee8 constant 128>
        unit-size <integer_cst 0x7ffff5180f00 constant 16>
        align:128 warn_if_not_align:0 symtab:0 alias-set 13 canonical-type
0x7ffff51b0bd0 precision:128 min <integer_cst 0x7
ffff51811d0 0> max <integer_cst 0x7ffff51f1130
0xffffffffffffffffffffffffffffffff>>
    unsigned V1TI size <integer_cst 0x7ffff5180ee8 128> unit-size <integer_cst
0x7ffff5180f00 16>
    align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff51b5dd8 nunits:1>

We have the movmisalign support for V1TI

#define HAVE_movmisalignv4si (VECTOR_MEM_VSX_P (V4SImode) &&
TARGET_ALLOW_MOVMISALIGN)
#define HAVE_movmisalignv4sf (VECTOR_MEM_VSX_P (V4SFmode) &&
TARGET_ALLOW_MOVMISALIGN)
#define HAVE_movmisalignv2di (VECTOR_MEM_VSX_P (V2DImode) &&
TARGET_ALLOW_MOVMISALIGN)
#define HAVE_movmisalignv2df (VECTOR_MEM_VSX_P (V2DFmode) &&
TARGET_ALLOW_MOVMISALIGN)
#define HAVE_movmisalignv1ti (VECTOR_MEM_VSX_P (V1TImode) &&
TARGET_ALLOW_MOVMISALIGN)

The misalign in the failure is 8, it makes the hook
rs6000_builtin_support_vector_misalignment return true. The loop vectorization
fails to vectorize for V1TI due to the resulted vectorization factor is 1. But
for this failure it's BB slp, it looks allowable to query the cost with V1TI. I
think Richard E. is right, it's a rs6000 specific issue.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-10-18  6:40 ` linkw at gcc dot gnu.org
@ 2021-10-18  7:25 ` rguenth at gcc dot gnu.org
  2021-10-18  8:24 ` linkw at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-18  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|rguenth at gcc dot gnu.org         |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
the backend says it can support misaligned V1TI via
rs6000_builtin_support_vector_misalignment:

rs6000_builtin_support_vector_misalignment (mode=E_V1TImode, type=<integer_type
0x7ffff66f41f8>, 
    misalignment=8, is_packed=false) at
../../src/trunk/gcc/config/rs6000/rs6000.c:5069
...
      /* VSX supports word-aligned vector.  */
      if (misalignment % 4 == 0)
        return true;

so the vectorizer classifies it as dr_unaligned_supported and we of course
are then allowed to cost the supported unaligned store but the cost
hook doesn't consider elements == 1.

Now, we probably should avoid 1-lane vector vectorization in BB vect but that's
a different story.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-10-18  7:25 ` rguenth at gcc dot gnu.org
@ 2021-10-18  8:24 ` linkw at gcc dot gnu.org
  2021-10-19 21:19 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-18  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org

--- Comment #9 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #8)
> the backend says it can support misaligned V1TI via
> rs6000_builtin_support_vector_misalignment:
> 
> rs6000_builtin_support_vector_misalignment (mode=E_V1TImode,
> type=<integer_type 0x7ffff66f41f8>, 
>     misalignment=8, is_packed=false) at
> ../../src/trunk/gcc/config/rs6000/rs6000.c:5069
> ...
>       /* VSX supports word-aligned vector.  */
>       if (misalignment % 4 == 0)
>         return true;
> 
> so the vectorizer classifies it as dr_unaligned_supported and we of course
> are then allowed to cost the supported unaligned store but the cost
> hook doesn't consider elements == 1.
> 
> Now, we probably should avoid 1-lane vector vectorization in BB vect but
> that's
> a different story.

Yes, it's inconsistent between the hook and costing query. I'll make a patch.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-10-18  8:24 ` linkw at gcc dot gnu.org
@ 2021-10-19 21:19 ` pinskia at gcc dot gnu.org
  2021-10-20  6:53 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-19 21:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |seurer at gcc dot gnu.org

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 102372 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2021-10-19 21:19 ` pinskia at gcc dot gnu.org
@ 2021-10-20  6:53 ` marxin at gcc dot gnu.org
  2021-10-25  3:09 ` linkw at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20  6:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 102847 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2021-10-20  6:53 ` marxin at gcc dot gnu.org
@ 2021-10-25  3:09 ` linkw at gcc dot gnu.org
  2021-10-28  7:46 ` cvs-commit at gcc dot gnu.org
  2021-10-28  7:49 ` linkw at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-25  3:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> ---
The patch was posted at
https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582454.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2021-10-25  3:09 ` linkw at gcc dot gnu.org
@ 2021-10-28  7:46 ` cvs-commit at gcc dot gnu.org
  2021-10-28  7:49 ` linkw at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-28  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:b343a29dbcbfc5eaca11243ac603a1e5b48630f3

commit r12-4762-gb343a29dbcbfc5eaca11243ac603a1e5b48630f3
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Thu Oct 28 01:11:56 2021 -0500

    rs6000: Fix ICE of vect cost related to V1TI [PR102767]

    As PR102767 shows, the commit r12-3482 exposed one ICE in function
    rs6000_builtin_vectorization_cost.  We claims V1TI supports
    movmisalign on rs6000 (See define_expand "movmisalign<mode>"), so
    it return true in rs6000_builtin_support_vector_misalignment for
    misalign 8.  Later in the cost querying function
    rs6000_builtin_vectorization_cost, we don't have the arms to handle
    the V1TI input under (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN).

    The proposed fix is to add the consideration for V1TI, simply make
    it as the cost for doubleword which is apparently bigger than the
    cost of scalar, won't have the vectorization to happen, just to
    keep consistency and avoid ICE.  Another thought is to not support
    movmisalign for V1TI, but it sounds like a bad idea since it doesn't
    match the reality.

    Note that this patch also fixes up the wrong indentations around.

    gcc/ChangeLog:

            PR target/102767
            * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
Consider
            V1T1 mode for unaligned load and store.

    gcc/testsuite/ChangeLog:

            PR target/102767
            * gcc.target/powerpc/ppc-fortran/pr102767.f90: New file.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug target/102767] [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216
  2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2021-10-28  7:46 ` cvs-commit at gcc dot gnu.org
@ 2021-10-28  7:49 ` linkw at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-28  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #14 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed on latest trunk.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-10-28  7:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  8:43 [Bug target/102767] New: [12 Regression] ICE in rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:5216 marxin at gcc dot gnu.org
2021-10-15  8:51 ` [Bug target/102767] " marxin at gcc dot gnu.org
2021-10-15  9:39 ` linkw at gcc dot gnu.org
2021-10-15 13:07 ` rguenth at gcc dot gnu.org
2021-10-15 13:31 ` linkw at gcc dot gnu.org
2021-10-15 15:51 ` rearnsha at gcc dot gnu.org
2021-10-16  0:00 ` [Bug target/102767] [12 Regression] " pinskia at gcc dot gnu.org
2021-10-16 13:47 ` segher at gcc dot gnu.org
2021-10-18  6:40 ` linkw at gcc dot gnu.org
2021-10-18  7:25 ` rguenth at gcc dot gnu.org
2021-10-18  8:24 ` linkw at gcc dot gnu.org
2021-10-19 21:19 ` pinskia at gcc dot gnu.org
2021-10-20  6:53 ` marxin at gcc dot gnu.org
2021-10-25  3:09 ` linkw at gcc dot gnu.org
2021-10-28  7:46 ` cvs-commit at gcc dot gnu.org
2021-10-28  7:49 ` linkw at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).