[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2021-05-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.5 |--- CC|

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2020-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.4 |8.5 --- Comment #36 from Jakub Jelinek

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #35 from Maciej W. Rozycki --- So presumably the actual solution for n32 would be the same as with x32 and SIB, which IIUC cannot rely on hardware wrapping around the address space either.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #34 from Maciej W. Rozycki --- (In reply to mpf from comment #29) > I don't remember the detail of this issue but I believe I was convinced that > it is down to the lack of setting PX appropriately in HW. UX==0, PX==1. The > PX

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #33 from Thomas De Schampheleire --- (In reply to Andrew Pinski from comment #32) > >I'm currently using -march=octeon3 or -march=octeon2 as appropriate. > > Can you report this to Marvell (Cavium)? O32 was not used much on

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #32 from Andrew Pinski --- >I'm currently using -march=octeon3 or -march=octeon2 as appropriate. Can you report this to Marvell (Cavium)? O32 was not used much on Octeon.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #31 from Thomas De Schampheleire --- (In reply to Maciej W. Rozycki from comment #27) > Yes, it is the same problem, the same address calculation occurs here, > and the lack of 32-bit address space wraparound is a part of the n32 >

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #30 from Thomas De Schampheleire --- (In reply to mpf from comment #29) > I don't remember the detail of this issue but I believe I was convinced that > it is down to the lack of setting PX appropriately in HW. UX==0, PX==1. The > PX

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #29 from mpf at gcc dot gnu.org --- I don't remember the detail of this issue but I believe I was convinced that it is down to the lack of setting PX appropriately in HW. UX==0, PX==1. The PX control bit forces address calculations

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #28 from Richard Biener --- (In reply to James Cowgill from comment #0) > Before the ldxc1 instruction is executed, gdb reports that the values in v0 > and s0 are both large integers (above 0x8000): > (gdb) print/x $v0 > $1 =

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-21 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #27 from Maciej W. Rozycki --- Yes, it is the same problem, the same address calculation occurs here, and the lack of 32-bit address space wraparound is a part of the n32 Linux ABI, which implies support for processors that do not

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-21 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #26 from Thomas De Schampheleire --- (In reply to Thomas De Schampheleire from comment #25) > Is it possible that this same problem is applicable on the 'lwx' instruction? > I am using MIPS64 n32. > > I first saw the original

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-08-21 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #25 from Thomas De Schampheleire --- Is it possible that this same problem is applicable on the 'lwx' instruction? I am using MIPS64 n32. I first saw the original problem as described in this bug with instruction 'lwxc1'. I then

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2019-02-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.3 |8.4 --- Comment #24 from Jakub Jelinek

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2018-07-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.2 |8.3 --- Comment #23 from Jakub Jelinek

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2018-05-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Jakub Jelinek changed: What|Removed |Added Target Milestone|8.0 |8.2 --- Comment #22 from Jakub Jelinek

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-03-07 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 mpf at gcc dot gnu.org changed: What|Removed |Added Known to work||7.0 Target Milestone|---

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-02-01 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #20 from Doug Gilmore --- I'll collect more tracing data on the costing problem. Hopefully I post an update in the next few days.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-02-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #19 from Richard Biener --- I agree with the comments that this (if at all) needs to be fixed at RTL expansion time where we already do quite some "hacks" for sizetype in POINTER_PLUS_EXPR context: case POINTER_PLUS_EXPR:

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-30 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Doug Gilmore changed: What|Removed |Added CC||law at redhat dot com,

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-30 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #17 from Doug Gilmore --- > This really throws off the costing of substituting different IVs on > MIPS. I forgot to mention that for MIPS the net of effect r216501 is to not produce indexed memory OPs in simple examples where we

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-30 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #16 from Doug Gilmore --- Created attachment 40632 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40632=edit Tweak to adjust_setup_cost (r220473). Second patch associated with previous comment.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-30 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #15 from Doug Gilmore --- Created attachment 40631 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40631=edit Prototype change to backout r216501. > Bisected the problem to commit r216501: The review discussion of r216501

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-19 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #14 from mpf at gcc dot gnu.org --- Author: mpf Date: Thu Jan 19 16:05:59 2017 New Revision: 244640 URL: https://gcc.gnu.org/viewcvs?rev=244640=gcc=rev Log: MIPS: PR target/78176 add -mlxc1-sxc1. gcc/ PR target/78176

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-16 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 mpf at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-13 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Doug Gilmore changed: What|Removed |Added CC||doug.gilmore at imgtec dot com ---

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-04 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Maciej W. Rozycki changed: What|Removed |Added CC|

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-04 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #10 from Eric Botcazou --- > Sure, and in this case there are no implicit extensions to larger types. The > bug does require an implicit extension to occur but this only happens at > runtime when on 64-bit hardware and the core is

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-04 Thread matthew.fortune at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #9 from Matthew Fortune --- (In reply to Eric Botcazou from comment #8) > > The expansion looks like an acceptable transformation to me i.e. it is not > > introducing the overflow for the offending pointer just maintaining what is >

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-04 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #8 from Eric Botcazou --- > The expansion looks like an acceptable transformation to me i.e. it is not > introducing the overflow for the offending pointer just maintaining what is > already in the tree. Wrap around for unsigned

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-04 Thread matthew.fortune at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #7 from Matthew Fortune --- (In reply to Eric Botcazou from comment #6) > > The issue may stem from the C front end where the dumps start off as below. > > Note that the '-1' in kappa-1 has ended up being represented as 1073741823 >

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-03 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org ---

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-03 Thread matthew.fortune at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Matthew Fortune changed: What|Removed |Added CC||matthew.fortune at imgtec dot com

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Target|

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-01 Thread james410 at cowgill dot org.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #3 from James Cowgill --- As far as I can tell, all the pointers in the original C code are valid and do not wrap. Some of the registers wrap, but they're not pointers (until added with other registers).

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 --- Comment #2 from Andrew Pinski --- I think this code is undefined if you have wrapping pointers. No pointer should ever be above INT_MAX in user space on mips32 due to the memory layout on MIPS32.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2016-11-01 Thread james410 at cowgill dot org.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176 James Cowgill changed: What|Removed |Added Attachment #39937|0 |1 is obsolete|