[Bug target/53447] missed optimization of 64bit ALU operation with small constant

2012-05-22 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53447

Steven Bosscher  changed:

   What|Removed |Added

 CC||steven at gcc dot gnu.org

--- Comment #1 from Steven Bosscher  2012-05-22 
08:24:52 UTC ---
Confirmed. 

Here is the assembler output with the "-dAp -fdump-rtl-all-details" options:

t0p:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
@ BLOCK 2 freq:1 seq:0
@ PRED: ENTRY [100.0%]  (fallthru)
ldrdr2, [r0]@ 6*arm_movdi/4[length = 8]
push{r4, r5}@ 20*push_multi[length = 2]
movsr4, #1@ 16*thumb2_movsi_shortim[length = 2]
addsr2, r2, r4@ 18*addsi3_compare_op1/1[length = 4]
movr5, #0@ 17*thumb2_movsi_insn/2[length = 4]
adcr3, r3, r5@ 19*addsi3_carryin_ltu[length = 4]
strdr2, [r0]@ 9*arm_movdi/5[length = 8]
@ SUCC: EXIT [100.0%] 
pop{r4, r5}
bxlr


The add is a DImode add up to the pr53447.c.195r.postreload dump:

(insn 6 3 13 2 (set (reg:DI 2 r2 [orig:137 D.4118 ] [137])
(mem:DI (reg/v/f:SI 0 r0 [orig:136 p ] [136]) [2 *p_1(D)+0 S8 A64]))
pr53447.c:3 182 {*arm_movdi}
 (nil))

(insn 13 6 8 2 (set (reg:DI 4 r4 [139])
(const_int 1 [0x1])) pr53447.c:3 182 {*arm_movdi}
 (expr_list:REG_EQUIV (const_int 1 [0x1])
(nil)))

(insn 8 13 9 2 (parallel [ 
(set (reg:DI 2 r2 [orig:137 D.4118 ] [137])
(plus:DI (reg:DI 2 r2 [orig:137 D.4118 ] [137])
(reg:DI 4 r4 [139])))
(clobber (reg:CC 24 cc))
]) pr53447.c:3 1 {*arm_adddi3}
 (nil)) 

(insn 9 8 12 2 (set (mem:DI (reg/v/f:SI 0 r0 [orig:136 p ] [136]) [2 *p_1(D)+0
S8 A64])
(reg:DI 2 r2 [orig:137 D.4118 ] [137])) pr53447.c:3 182 {*arm_movdi}
 (nil)) 



The add is split in the pr53447.c.197r.split2 dump:

(insn 6 3 16 2 (set (reg:DI 2 r2 [orig:137 D.4118 ] [137])
(mem:DI (reg/v/f:SI 0 r0 [orig:136 p ] [136]) [2 *p_1(D)+0 S8 A64]))
pr53447.c:3 182 {*arm_movdi}
 (nil)) 

(insn 16 6 17 2 (set (reg:SI 4 r4 [139])
(const_int 1 [0x1])) pr53447.c:3 718 {*thumb2_movsi_insn}
 (nil))

(insn 17 16 18 2 (set (reg:SI 5 r5 [+4 ])
(const_int 0 [0])) pr53447.c:3 718 {*thumb2_movsi_insn}
 (nil))

(insn 18 17 19 2 (parallel [
(set (reg:CC_C 24 cc)
(compare:CC_C (plus:SI (reg:SI 2 r2 [orig:137 D.4118 ] [137])
(reg:SI 4 r4 [139]))
(reg:SI 2 r2 [orig:137 D.4118 ] [137])))
(set (reg:SI 2 r2 [orig:137 D.4118 ] [137])
(plus:SI (reg:SI 2 r2 [orig:137 D.4118 ] [137])
(reg:SI 4 r4 [139])))
]) pr53447.c:3 10 {*addsi3_compare_op1}
 (nil))

(insn 19 18 9 2 (set (reg:SI 3 r3 [ D.4118+4 ])
(plus:SI (plus:SI (reg:SI 3 r3 [ D.4118+4 ])
(reg:SI 5 r5 [+4 ]))
(ltu:SI (reg:CC_C 24 cc)
(const_int 0 [0] pr53447.c:3 14 {*addsi3_carryin_ltu}
 (nil))

(insn 9 19 12 2 (set (mem:DI (reg/v/f:SI 0 r0 [orig:136 p ] [136]) [2 *p_1(D)+0
S8 A64])
(reg:DI 2 r2 [orig:137 D.4118 ] [137])) pr53447.c:3 182 {*arm_movdi}
 (nil))


[Bug c/52862] [4.5/4.6 Regression] ICE convert_to_pointer, at convert.c:50

2012-05-22 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52862

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||4.6.4
 Resolution||FIXED
   Target Milestone|4.5.4   |4.6.4
  Known to fail|4.6.4   |4.6.3

--- Comment #9 from Richard Guenther  2012-05-22 
09:18:41 UTC ---
Fixed for 4.6.4, I don't intend to backport this further.


[Bug target/53448] New: [avr] ignoring __attribute__((aligned(2)))

2012-05-22 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53448

 Bug #: 53448
   Summary: [avr] ignoring __attribute__((aligned(2)))
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: g...@gcc.gnu.org
CC: eric.wedding...@atmel.com
Target: avr


int var __attribute__((aligned(2))) = 1;

gets compiled to

.globalvar
.data
.typevar, @object
.sizevar, 2
var:
.word1


i.e. the alignment directive .p2align 1 is missing.


[Bug target/53448] [avr] ignoring __attribute__((aligned(2)))

2012-05-22 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53448

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-22
 AssignedTo|unassigned at gcc dot   |gjl at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Georg-Johann Lay  2012-05-22 
08:39:51 UTC ---
Created attachment 27474
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27474
C test case

More test cases


[Bug c/52952] Wformat location info is bad (wrong column number)

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952

--- Comment #5 from Jakub Jelinek  2012-05-22 
08:29:08 UTC ---
The format string could be even something like
   void f() {
 __builtin_printf(
u8R"abcd(%.)abcd"
   "*d");
  }
So, the question is, if we have a way to find from the source_location on the
ADDR_EXPR around STRING_CST the original non-concatenated tokens, and given
index into the (possibly) translated STRING_CST redo the lexing of those
tokens, looking at which byte in the source tokens maps to that offset in the
STRING_CST.


[Bug tree-optimization/53436] Volatile behaves strange with OpenMP

2012-05-22 Thread o.mangold at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53436

--- Comment #6 from o.mangold at googlemail dot com 2012-05-22 08:32:03 UTC ---
Yes, I get, that it's not a good way to do things, as (among other reasons) a
volatile access is no memory fence. So accesses to other locations may not be
ordered. But just for the sake of correctness, accesses should be ordered, if
they all go to volatile variables, no? From the C99-standard, section 5.1.2.3:

> At sequence points, volatile objects are stable in the sense that previous 
> accesses are complete and subsequent accesses have not yet occurred.

This means buffering the reads to the volatile variable over multiple
iterations of the while loop is not allowed, or do I get this wrong?


[Bug target/53447] missed optimization of 64bit ALU operation with small constant

2012-05-22 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53447

Steven Bosscher  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-22
 Ever Confirmed|0   |1


[Bug target/53192] Incorrect arguments to AVX2's gather intrinsics

2012-05-22 Thread kirill.yukhin at intel dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53192

Yukhin Kirill  changed:

   What|Removed |Added

 CC||areg.melikadamyan at gmail
   ||dot com

--- Comment #3 from Yukhin Kirill  2012-05-22 
08:23:56 UTC ---
(In reply to comment #1)
> Please provide a testcase to show the problem.

I have no idea, which kind of test it should be.
These is just MS-ICC-GCC incompatibility issue


[Bug tree-optimization/53436] Volatile behaves strange with OpenMP

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53436

--- Comment #5 from Jakub Jelinek  2012-05-22 
07:59:01 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > The testcase is not valid OpenMP, there is no flush operation in between the
> > store and reads, 
> 
> Is that also needed with volatile variables? Would be quite counterintuitive.

I believe so.  Volatile only makes sure the compiler emits a store of the
variable to memory, but the CPU can just store it into a cache.  There is
nothing that orders that store compared to other stores/loads.
So, just use the appropriate OpenMP directives for synchronization, rather than
bad attempts at busy waiting using volatile.


[Bug tree-optimization/53436] Volatile behaves strange with OpenMP

2012-05-22 Thread o.mangold at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53436

--- Comment #4 from o.mangold at googlemail dot com 2012-05-22 07:45:46 UTC ---
(In reply to comment #3)
> The testcase is not valid OpenMP, there is no flush operation in between the
> store and reads, 

Is that also needed with volatile variables? Would be quite counterintuitive.

> that said, there was a bug on the GCC side that I've fixed.

Great, thanks.


[Bug middle-end/53409] [4.7/4.8 Regression] ICE: vector VEC(vec_void_p,base) index domain error, in vinfo_for_stmt at tree-vectorizer.h:630

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53409

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution||FIXED

--- Comment #6 from Jakub Jelinek  2012-05-22 
07:38:01 UTC ---
Fixed.


[Bug tree-optimization/53410] [4.7/4.8 Regression] ICE in build_int_cst_wide, at tree.c:1219

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53410

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Component|c   |tree-optimization
 Resolution||FIXED

--- Comment #7 from Jakub Jelinek  2012-05-22 
07:39:49 UTC ---
Fixed.


[Bug tree-optimization/53366] [4.7/4.8 Regression] wrong code generation by tree vectorizer using AVX

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53366

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.1
Summary|wrong code generation by|[4.7/4.8 Regression] wrong
   |tree vectorizer using AVX   |code generation by tree
   ||vectorizer using AVX

--- Comment #11 from Jakub Jelinek  2012-05-22 
07:38:53 UTC ---
Fixed.


[Bug tree-optimization/53436] Volatile behaves strange with OpenMP

2012-05-22 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53436

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution||FIXED

--- Comment #3 from Jakub Jelinek  2012-05-22 
07:37:14 UTC ---
The testcase is not valid OpenMP, there is no flush operation in between the
store and reads, that said, there was a bug on the GCC side that I've fixed.


[Bug target/53447] New: missed optimization of 64bit ALU operation with small constant

2012-05-22 Thread carrot at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53447

 Bug #: 53447
   Summary: missed optimization of 64bit ALU operation with small
constant
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: car...@google.com
Target: arm-unknown-linux-gnueabi


Compile the following code with options -march=armv7-a -O2 -mthumb

void t0p(long long *p)
{
  *p += 1;
}

GCC 4.8  generates:


t0p:
ldrdr2, [r0]
push{r4, r5}
movsr4, #1   //A
addsr2, r2, r4   //B
movr5, #0   //C
adcr3, r3, r5   //D
strdr2, [r0]
pop{r4, r5}
bxlr

Instructions ABCD can be simplified as

adds   r2, r2, 1
adcr3, r3, 0

This sequence is smaller and faster than original code, it uses two less
registers, so the push/pop instructions can also be removed.

Both arm/thumb mode and Os/O2 generates similar code.

This optimization can also be applied to other alu operations, such as
sub/and/or/xor/cmp.


[Bug bootstrap/49986] Compilation of cross GCC (Linux -> AIX) fails

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49986

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from Andrew Pinski  2012-05-22 
06:11:30 UTC ---
No feed back in over 4 months so closing.

Also IIRC binutils is not fully supported targeting AIX yet.


[Bug bootstrap/50993] IRIX: fails to build in lto for sgi1.0 linker flag

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50993

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WONTFIX
   Target Milestone|--- |4.8.0

--- Comment #2 from Andrew Pinski  2012-05-22 
06:09:42 UTC ---
IRIX 6.5 support was removed so closing as won't fix.


[Bug c++/53380] .ehframe could be smaller

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53380

--- Comment #2 from Andrew Pinski  2012-05-22 
06:01:32 UTC ---
Did -fno-asynchronous-unwind-tables do what you wanted it to do?  In that
disable the unwinding tables when not using exceptions?


[Bug bootstrap/40650] gcc-4.5-20090702 won't build on OS X 10.5 with GMP/MPFR in-tree

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40650

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID

--- Comment #3 from Andrew Pinski  2012-05-22 
06:13:05 UTC ---
No feedback in over 3 months so closing.


[Bug bootstrap/51450] configure's test for -fno-rtti -fno-exceptions broken

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51450

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |NEW


[Bug bootstrap/42666] xgcc: Internal error: segmentation violation (program cc1)

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42666

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID

--- Comment #5 from Andrew Pinski  2012-05-22 
06:12:42 UTC ---
No feedback in over 3 months so closing.


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

--- Comment #5 from Andrew Pinski  2012-05-22 
05:57:23 UTC ---
function == unit .


[Bug bootstrap/37308] bootstrap hangs in libstdc++

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37308

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID

--- Comment #11 from Andrew Pinski  2012-05-22 
06:11:58 UTC ---
No feedback in over 4 months so closing.


[Bug bootstrap/49707] GCC sends incorrect flags to native IRIX ld

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49707

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-05-22
 Ever Confirmed|0   |1

--- Comment #1 from Andrew Pinski  2012-05-22 
06:08:55 UTC ---
How was irix-crti.o built from the GCC Log?


[Bug c++/53350] Internal compiler error when compiling boost/smart_ptr/intrusive_ptr.hpp 1.49

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53350

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #13 from Andrew Pinski  2012-05-22 
06:03:10 UTC ---
Fixed as mentioned already.


[Bug gcov-profile/53414] gcov does not generate 'Lines' record for final block of functions

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53414

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-05-22
 Ever Confirmed|0   |1
   Severity|major   |normal

--- Comment #1 from Andrew Pinski  2012-05-22 
05:59:35 UTC ---
Can you provide a full testcase that is runnable?

Also does this happen with newer versions of GCC?


[Bug bootstrap/49707] GCC sends incorrect flags to native IRIX ld

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49707

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WONTFIX
   Target Milestone|--- |4.8.0

--- Comment #2 from Andrew Pinski  2012-05-22 
06:10:04 UTC ---
IRIX 6.5 support was removed so closing as won't fix.


[Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|4.7.2   |4.7.1


[Bug c++/53380] .ehframe could be smaller

2012-05-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53380

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-05-22
 Ever Confirmed|0   |1


<    1   2