https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #17 from Jeffrey A. Law ---
*** Bug 115849 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #16 from Vineet Gupta ---
(In reply to Vineet Gupta from comment #15)
> On the branch devel/vineetg/optim-double-const-m0 I have double -0.0 working.
>
> znd:
> li a5,-1
> sllia5,a5,63
> sd a5,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #15 from Vineet Gupta ---
(In reply to Vineet Gupta from comment #12)
> > void znd(double *d) { *d = -0.0; }
> > void znf(float *f) { *f = -0.0; }
We need 3 set of changes to get const -0.0 working:
1. Allow expand to generate set
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #14 from CVS Commits ---
The master branch has been updated by Vineet Gupta :
https://gcc.gnu.org/g:ecfa870ff29d979bd2c3d411643b551f2b6915b0
commit r14-2731-gecfa870ff29d979bd2c3d411643b551f2b6915b0
Author: Vineet Gupta
Date: Th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #13 from Andrew Pinski ---
You could also look at how aarch64 implemented a similar thing (not just for
-0.0 but for many other constants too):
r8-2248-ga217096563e356fa03c .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #12 from Vineet Gupta ---
> void znd(double *d) { *d = -0.0; }
> void znf(float *f) { *f = -0.0; }
The rough approach I'm thinking of is to
(1) Introduce a constraint for -0.0 and perhaps a predicate as well for
"*movdf_hardfloat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #11 from Vineet Gupta ---
There's a variation which can be optimized as well and seems non trivial to
implement
Now it is the negative constant -0.0 to be stored to mem. In bit notation this
has a single sign bit set thus can be opt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #10 from Vineet Gupta ---
The fix for handling +0.0 is posted to list - really trivial.
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625217.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #9 from Vineet Gupta ---
(In reply to Vineet Gupta from comment #8)
> (In reply to Jeffrey A. Law from comment #5)
> > I'd bet it's const_0_operand not allowing CONST_DOUBLE.
>
> Correct.
>
> > The question is what unintended side
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #8 from Vineet Gupta ---
(In reply to Jeffrey A. Law from comment #5)
> I'd bet it's const_0_operand not allowing CONST_DOUBLE.
Correct.
> The question is what unintended side effects we'd have if we allowed
> CONST_DOUBLE 0.0 in c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #7 from palmer at gcc dot gnu.org ---
(In reply to palmer from comment #6)
> (In reply to Jeffrey A. Law from comment #5)
> > I'd bet it's const_0_operand not allowing CONST_DOUBLE.
> >
> > The question is what unintended side effect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
palmer at gcc dot gnu.org changed:
What|Removed |Added
CC||palmer at gcc dot gnu.org
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
Jeffrey A. Law changed:
What|Removed |Added
CC||law at gcc dot gnu.org
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #4 from Andrew Pinski ---
aarch64 has the following function to check for +0.0:
```
/* Return TRUE if rtx X is immediate constant 0.0 (but not in Decimal
Floating Point). */
bool
aarch64_float_const_zero_rtx_p (rtx x)
{
/* 0.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #3 from Vineet Gupta ---
Indeed the constraint already exists
(define_insn "*movdf_hardfloat_rv64"
[(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,m,m,*f,*r,
*r,*r,*m")
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
--- Comment #2 from Kito Cheng ---
And seems we already has such constraint for a while, not sure why GCC 13 did
that, I saw the status has changed to ASSIGNED, so I assume Vineet you are
already spending time on that, so I will just stop there
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
Kito Cheng changed:
What|Removed |Added
CC||kito at gcc dot gnu.org
--- Comment #1 fro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748
Vineet Gupta changed:
What|Removed |Added
Ever confirmed|0 |1
Last reconfirmed|
18 matches
Mail list logo