Re: semantics of uninitialized values in GIMPLE

2023-07-11 Thread Richard Biener via Gcc
On Tue, Jul 11, 2023 at 12:56 AM Krister Walfridsson wrote: > > On Fri, 7 Jul 2023, Richard Biener wrote: > > >> I have implemented support for uninitialized memory in my translation > >> validator. But I am not sure how well this corresponds to the GIMPLE > >> semantics, so I have some questions.

Re: semantics of uninitialized values in GIMPLE

2023-07-11 Thread Krister Walfridsson via Gcc
On Tue, 11 Jul 2023, Richard Biener wrote: With "plain copies", do you mean treating it as it is always defined? That would prevent optimizations such as transforming int t; if (1) t = *p; else t = 0; return t + 1; to the equivalent of return *p + 1; because the latt

Re: semantics of uninitialized values in GIMPLE

2023-07-11 Thread Richard Biener via Gcc
On Tue, Jul 11, 2023 at 10:29 AM Krister Walfridsson wrote: > > On Tue, 11 Jul 2023, Richard Biener wrote: > > >> With "plain copies", do you mean treating it as it is always defined? That > >> would prevent optimizations such as transforming > >> > >>int t; > >>if (1) > >> t = *p; >

m68k Coldfire and PC-relative addressing distances

2023-07-11 Thread Florian Weimer via Gcc
How does the Coldfire m68k subtarget and sure that displacements in PIC code are within the addressable range? We have a source file in glibc that fails at assembly because it contains a branch that is out of range with -fpic. The GAS error is: …/iso-2022-jp.s: Fatal error: Tried to convert PC r

Re: semantics of uninitialized values in GIMPLE

2023-07-11 Thread Krister Walfridsson via Gcc
On Tue, 11 Jul 2023, Richard Biener wrote: I'll update my implementation, and will come back with a more detailed proposal in a few weeks when I have tried some more things. Thanks! I've also taken the opportunity given by your work at the recent bugs to propose a talk at this years GNU Cauld

Re: m68k Coldfire and PC-relative addressing distances

2023-07-11 Thread Richard Biener via Gcc
On Tue, Jul 11, 2023 at 11:36 AM Florian Weimer via Gcc wrote: > > How does the Coldfire m68k subtarget and sure that displacements in PIC > code are within the addressable range? There is usually a branch shortening pass relying on correct instruction lengths. I suggest to file a bugreport with

Re: m68k Coldfire and PC-relative addressing distances

2023-07-11 Thread Florian Weimer via Gcc
* Richard Biener: > On Tue, Jul 11, 2023 at 11:36 AM Florian Weimer via Gcc > wrote: >> >> How does the Coldfire m68k subtarget and sure that displacements in PIC >> code are within the addressable range? > > There is usually a branch shortening pass relying on correct > instruction lengths. > >

Re: m68k Coldfire and PC-relative addressing distances

2023-07-11 Thread Jeff Law via Gcc
On 7/11/23 04:48, Richard Biener via Gcc wrote: On Tue, Jul 11, 2023 at 11:36 AM Florian Weimer via Gcc wrote: How does the Coldfire m68k subtarget and sure that displacements in PIC code are within the addressable range? There is usually a branch shortening pass relying on correct instru