[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-09-16 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

Igor Zamyatin izamyatin at gmail dot com changed:

   What|Removed |Added

 CC||vmakarov at redhat dot com

--- Comment #8 from Igor Zamyatin izamyatin at gmail dot com 2011-09-16 
14:35:34 UTC ---
I was checking coalescing part in IRA but it looks like coalescing is fine.

Adding Vladimir, maybe he could give some advice here


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-09-14 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

--- Comment #7 from Igor Zamyatin izamyatin at gmail dot com 2011-09-14 
14:30:35 UTC ---
In RTL everythin is vice-versa, additional instruction appears:

For the bad case couple instructions are responsible for cb load (asmcons
dump):

(insn 52 51 53 5 (set (reg:QI 83 [ D.2685 ])
  (mem:QI (plus:SI (reg/v/f:SI 75 [ inptr1 ])
  (reg/v:SI 117 [ col ])) [0 MEM[base: inptr1_19, index:
col_90, offset: 0B]+0 S1 A8])) ../test_bad_4_6.c:42 66 {*movqi_internal}
   (nil))

and later 

 (insn 62 61 122 5 (parallel [
  (set (reg:SI 152 [ D.2685 ])
  (zero_extend:SI (reg:QI 83 [ D.2685 ])))
  (clobber (reg:CC 17 flags))
  ]) ../test_bad_4_6.c:47 123 {*zero_extendqisi2_movzbl_and}
   (expr_list:REG_DEAD (reg:QI 83 [ D.2685 ])
  (expr_list:REG_UNUSED (reg:CC 17 flags)
  (nil


while in good case only one:

(insn 52 51 53 5 (parallel [
(set (reg/v:SI 84 [ cb ])
(zero_extend:SI (mem:QI (plus:SI (reg/v/f:SI 75 [ inptr1 ])
(reg/v:SI 119 [ col ])) [0 MEM[base: inptr1_19,
index: col_90, offset: 0B]+0 S1 A8])))
(clobber (reg:CC 17 flags))
]) ../test_good_4_6.c:42 123 {*zero_extendqisi2_movzbl_and}
 (expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))

 And life ranges in bad case became splitted:

 a34(r152): [71..82]
  
  a38(r83): [83..92]

 And in good case only:

  a34(r84): [71..90]


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-29 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

--- Comment #5 from Igor Zamyatin izamyatin at gmail dot com 2011-08-29 
11:48:12 UTC ---
Yes, looks like this revision is the reason


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-29 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||rguenth at gcc dot gnu.org


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-29 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #6 from Richard Guenther rguenth at gcc dot gnu.org 2011-08-29 
13:50:56 UTC ---
It performs perfectly sensible optimizations:

@@ -91,11 +83,9 @@
   y_33 = (int) D.2055_32;
   D.2056_34 = inptr1_19 + col_5;
   D.2057_35 = *D.2056_34;
-  cb_36 = (int) D.2057_35;
   D.2058_37 = inptr2_24 + col_5;
   D.2059_38 = *D.2058_37;
-  cr_39 = (int) D.2059_38;
-  cr.0_40 = (unsigned int) cr_39;
+  cr.0_40 = (unsigned int) D.2059_38;
...
@@ -104,12 +94,11 @@
   D.2066_48 = range_limit_47(D) + D.2065_46;
   D.2067_49 = *D.2066_48;
   *outptr_4 = D.2067_49;
-  D.2068_50 = outptr_4 + 1;
-  cb.1_51 = (unsigned int) cb_36;
+  cb.1_51 = (unsigned int) D.2057_35;
   D.2070_52 = cb.1_51 * 4;
   D.2071_54 = Cbgtab_53(D) + D.2070_52;
   D.2072_55 = *D.2071_54;
-  cr.0_56 = (unsigned int) cr_39;
+  cr.0_56 = (unsigned int) D.2059_38;
   D.2061_57 = cr.0_56 * 4;
   D.2073_59 = Crgtab_58(D) + D.2061_57;
   D.2074_60 = *D.2073_59;

This seems to be at most a register allocation or target issue.

What it does is change (unsinged)(int)*load to (unsigned)*load,
eventually enlarging life-ranges (didn't double-check that).


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011-08-26
 Ever Confirmed|0   |1

--- Comment #4 from H.J. Lu hjl.tools at gmail dot com 2011-08-26 21:42:10 
UTC ---
Can you verify if revision 173612:

http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00390.html

causes this regression?


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-25 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

--- Comment #2 from Igor Zamyatin izamyatin at gmail dot com 2011-08-25 
13:17:36 UTC ---
For gcc with 
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --disable-bootstrap --enable-languages=c,c++
--prefix=/export/users/izamyati/gcc_4_6_2_prefix/
Thread model: posix
gcc version 4.6.2 20110825 (prerelease) (GCC)

everything is fine, no that spill-fill generated


[Bug target/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char-int conversion

2011-08-25 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

--- Comment #3 from H.J. Lu hjl.tools at gmail dot com 2011-08-25 13:56:52 
UTC ---
(In reply to comment #2)
 For gcc with 
 Target: x86_64-unknown-linux-gnu
 Configured with: ../configure --disable-bootstrap --enable-languages=c,c++
 --prefix=/export/users/izamyati/gcc_4_6_2_prefix/
 Thread model: posix
 gcc version 4.6.2 20110825 (prerelease) (GCC)
 
 everything is fine, no that spill-fill generated

Can we find which checkin caused this?