* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
@ 2012-11-07 17:40 ` ubizjak at gmail dot com
2012-11-07 18:57 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-07 17:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-07 17:39:52 UTC ---
(gdb) p debug_rtx (x)
(mem/j/c:BLK (plus:SI (reg/f:SI 54 virtual-stack-vars)
(const_int -16 [0xfffffffffffffff0])) [0 a.V4SF+0 S16 A128])
$1 = void
(gdb) p debug_rtx (y)
(const_vector:V4SF [
(const_double:SF 0.0 [0x0.0p+0])
(const_double:SF 1.0e+0 [0x0.8p+1])
(const_double:SF 2.0e+0 [0x0.8p+2])
(const_double:SF 3.0e+0 [0x0.cp+2])
])
$2 = void
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
2012-11-07 17:40 ` [Bug middle-end/55235] " ubizjak at gmail dot com
@ 2012-11-07 18:57 ` ebotcazou at gcc dot gnu.org
2012-11-07 19:05 ` ubizjak at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-11-07 18:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-11-07
Ever Confirmed|0 |1
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-11-07 18:57:10 UTC ---
The test looks nonsensical: it mixes vectors defined with -mno-sse and later
used with -msse2. Moving struct A to within 'main' eliminates the ICE,
presumably the structure somehow sees the -msse2.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
2012-11-07 17:40 ` [Bug middle-end/55235] " ubizjak at gmail dot com
2012-11-07 18:57 ` ebotcazou at gcc dot gnu.org
@ 2012-11-07 19:05 ` ubizjak at gmail dot com
2012-11-07 20:18 ` ubizjak at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-07 19:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-07 19:05:33 UTC ---
It looks to me that this is the problematic change:
--- trunk/gcc/expr.c 2012/10/20 20:16:27 192640
+++ trunk/gcc/expr.c 2012/10/20 21:00:23 192641
(...)
@@ -5225,21 +5244,26 @@
supposed to be bit-copied or bit-initialized. */
&& expr_size (exp) != const0_rtx)
{
- if (GET_MODE (temp) != GET_MODE (target)
- && GET_MODE (temp) != VOIDmode)
+ if (GET_MODE (temp) != GET_MODE (target) && GET_MODE (temp) != VOIDmode)
{
- int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp));
- if (GET_MODE (target) == BLKmode
- && GET_MODE (temp) == BLKmode)
- emit_block_move (target, temp, expr_size (exp),
- (call_param_p
- ? BLOCK_OP_CALL_PARM
- : BLOCK_OP_NORMAL));
- else if (GET_MODE (target) == BLKmode)
- store_bit_field (target, INTVAL (expr_size (exp)) * BITS_PER_UNIT,
- 0, 0, 0, GET_MODE (temp), temp);
+ if (GET_MODE (target) == BLKmode)
+ {
+ if (REG_P (temp))
+ {
+ if (TREE_CODE (exp) == CALL_EXPR)
+ copy_blkmode_from_reg (target, temp, TREE_TYPE (exp));
+ else
+ store_bit_field (target,
+ INTVAL (expr_size (exp)) * BITS_PER_UNIT,
+ 0, 0, 0, GET_MODE (temp), temp);
+ }
+ else
+ emit_block_move (target, temp, expr_size (exp),
+ (call_param_p
+ ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
+ }
emit_block_move was guarded with BLKmode guard on both operands, all other went
through store_bit_field.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
` (2 preceding siblings ...)
2012-11-07 19:05 ` ubizjak at gmail dot com
@ 2012-11-07 20:18 ` ubizjak at gmail dot com
2012-11-07 22:07 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2012-11-07 20:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-11-07 20:17:45 UTC ---
Please note that before your patch, emit_block_move was never called.
Following patch fixes testcase for me:
--cut here--
Index: expr.c
===================================================================
--- expr.c (revision 193296)
+++ expr.c (working copy)
@@ -5246,19 +5246,12 @@ store_expr (tree exp, rtx target, int call_param_p
{
if (GET_MODE (target) == BLKmode)
{
- if (REG_P (temp))
- {
- if (TREE_CODE (exp) == CALL_EXPR)
- copy_blkmode_from_reg (target, temp, TREE_TYPE (exp));
- else
- store_bit_field (target,
- INTVAL (expr_size (exp)) * BITS_PER_UNIT,
- 0, 0, 0, GET_MODE (temp), temp);
- }
+ if (REG_P (temp) && TREE_CODE (exp) == CALL_EXPR)
+ copy_blkmode_from_reg (target, temp, TREE_TYPE (exp));
else
- emit_block_move (target, temp, expr_size (exp),
- (call_param_p
- ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
+ store_bit_field (target,
+ INTVAL (expr_size (exp)) * BITS_PER_UNIT,
+ 0, 0, 0, GET_MODE (temp), temp);
}
else
convert_move (target, temp, TYPE_UNSIGNED (TREE_TYPE (exp)));
--cut here--
I am running bootstrap and regression test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
` (3 preceding siblings ...)
2012-11-07 20:18 ` ubizjak at gmail dot com
@ 2012-11-07 22:07 ` ebotcazou at gcc dot gnu.org
2012-11-07 22:35 ` uros at gcc dot gnu.org
2012-11-08 13:13 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-11-07 22:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-11-07 22:07:00 UTC ---
> Please note that before your patch, emit_block_move was never called.
Indeed, I missed that.
> Following patch fixes testcase for me:
>
> --cut here--
> Index: expr.c
> ===================================================================
> --- expr.c (revision 193296)
> +++ expr.c (working copy)
> @@ -5246,19 +5246,12 @@ store_expr (tree exp, rtx target, int call_param_p
> {
> if (GET_MODE (target) == BLKmode)
> {
> - if (REG_P (temp))
> - {
> - if (TREE_CODE (exp) == CALL_EXPR)
> - copy_blkmode_from_reg (target, temp, TREE_TYPE (exp));
> - else
> - store_bit_field (target,
> - INTVAL (expr_size (exp)) * BITS_PER_UNIT,
> - 0, 0, 0, GET_MODE (temp), temp);
> - }
> + if (REG_P (temp) && TREE_CODE (exp) == CALL_EXPR)
> + copy_blkmode_from_reg (target, temp, TREE_TYPE (exp));
> else
> - emit_block_move (target, temp, expr_size (exp),
> - (call_param_p
> - ? BLOCK_OP_CALL_PARM : BLOCK_OP_NORMAL));
> + store_bit_field (target,
> + INTVAL (expr_size (exp)) * BITS_PER_UNIT,
> + 0, 0, 0, GET_MODE (temp), temp);
> }
> else
> convert_move (target, temp, TYPE_UNSIGNED (TREE_TYPE (exp)));
This looks fine, although this is papering over the real problem:
(gdb) p debug_tree(field)
<field_decl 0x7ffff6dfe390 V4SF
type <vector_type 0x7ffff6df75e8
type <real_type 0x7ffff6d1de70 float SF
size <integer_cst 0x7ffff6d09d40 constant 32>
unit size <integer_cst 0x7ffff6d09d60 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x7ffff6d1de70
precision 32
pointer_to_this <pointer_type 0x7ffff6d250a8>>
sizes-gimplified V4SF
size <integer_cst 0x7ffff6d212a0 constant 128>
unit size <integer_cst 0x7ffff6d212c0 constant 16>
align 128 symtab 0 alias set -1 canonical type 0x7ffff6df75e8 nunits 4>
BLK file pr44948-2a.c line 12 col 9 size <integer_cst 0x7ffff6d212a0 128>
unit size <integer_cst 0x7ffff6d212c0 16>
align 128 offset_align 128
offset <integer_cst 0x7ffff6d09d80 type <integer_type 0x7ffff6d1d000
sizetype> constant 0>
bit offset <integer_cst 0x7ffff6d09e00 type <integer_type 0x7ffff6d1d0a8
bitsizetype> constant 0> context <record_type 0x7ffff6e342a0 A>>
(gdb) p field->decl_common.mode
$20 = BLKmode
(gdb) p field->typed.type->type_common.mode
$21 = V4SFmode
The field has BLKmode as DECL_MODE but V4SFmode as TYPE_MODE (TREE_TYPE) so a
VIEW_CONVERT_EXPR is missing somewhere if we need to support this nonsense...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
` (4 preceding siblings ...)
2012-11-07 22:07 ` ebotcazou at gcc dot gnu.org
@ 2012-11-07 22:35 ` uros at gcc dot gnu.org
2012-11-08 13:13 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: uros at gcc dot gnu.org @ 2012-11-07 22:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
--- Comment #6 from uros at gcc dot gnu.org 2012-11-07 22:34:53 UTC ---
Author: uros
Date: Wed Nov 7 22:34:48 2012
New Revision: 193314
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193314
Log:
PR middle-end/55235
* expr.c (store_expr): Do not call emit_block_move for
non-BLKmode values.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/55235] [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c
2012-11-07 17:36 [Bug middle-end/55235] New: [4.8 Regression] FAIL: gcc.target/i386/pr44948-2a.c ubizjak at gmail dot com
` (5 preceding siblings ...)
2012-11-07 22:35 ` uros at gcc dot gnu.org
@ 2012-11-08 13:13 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-08 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55235
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-08 13:12:56 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread