Re:RE: A problem with LRA

2017-04-23 Thread comp
a unified hard register set 0~63 is permitted to hold either interger or float value.Thanks. At 2017-04-18 21:45:54, "Matthew Fortune" wrote: >comp writes: >> Hi all, >> I recently have a problem with LRA. >> 1 The Bug use case >> int a=10; >> float

Re:Re: A problem with LRA

2017-04-23 Thread comp
It does not work when -fno-strict-aliasing is specified. At 2017-04-18 21:02:45, "Segher Boessenkool" wrote: >Hi, > >On Mon, Apr 17, 2017 at 09:11:56PM +0800, comp wrote: >>         float b; >>         *(int*)&b=a; > >This is undefined behaviour. Try with -fno-strict-aliasing, does it >then work

RE: A problem with LRA

2017-04-18 Thread Matthew Fortune
comp writes: > Hi all, > I recently have a problem with LRA. > 1 The Bug use case > int a=10; > float c=2.0,d; > main() > { >         float b; >         *(int*)&b=a; >         d=b+c; > } > > 2 The problem description > In the pass LRA, curr_insn_t

Re: A problem with LRA

2017-04-18 Thread Segher Boessenkool
Hi, On Mon, Apr 17, 2017 at 09:11:56PM +0800, comp wrote: >         float b; >         *(int*)&b=a; This is undefined behaviour. Try with -fno-strict-aliasing, does it then work as you expect? Segher

Re: A problem with LRA

2017-04-17 Thread David Edelsohn
Can you file this as a bug report in GCC Bugzilla? I assume that the target is Alpha? Thanks, David On Mon, Apr 17, 2017 at 9:11 AM, comp wrote: > > Hi all, > I recently have a problem with LRA. > 1 The Bug use case > int a=10; > float c=2.0,d; > main() > { >

A problem with LRA

2017-04-17 Thread comp
Hi all, I recently have a problem with LRA. 1 The Bug use case int a=10; float c=2.0,d; main() {         float b;         *(int*)&b=a;         d=b+c; }   2 The problem description In the pass LRA, curr_insn_transform () deal with the addition statement d = b + c, the corresponding rtx expres