Hi,
When commit the fix for pr111324, the test cases was named as pr111303.c
by mistake. Here, rename it to pr111324.c
Is this ok for trunk?
BR,
Jeff (Jiufu Guo)
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr111303.c: Rename to ...
* gcc.dg/tree-ssa/pr111324.c: ... this.
---
g
Hi,
In r14-3582, an "overflow_free_p" interface is added.
The pattern of "(t * 2) / 2" in match.pd can be simplified
by using this interface.
Bootstrap & regtest pass on ppc64{,le} and x86_64.
Is this ok for trunk?
BR,
Jeff (Jiufu)
gcc/ChangeLog:
* match.pd ((t * 2) / 2): Update to use
Hi,
I would like to have a ping.
BR,
Jeff (Jiufu Guo)
Jiufu Guo writes:
> Hi,
>
> As mentioned in PR108338, on p9, we could use mtvsrws to implement
> the bitcast from SI to SF (or lowpart DI to SF).
>
> For code:
> *(long long*)buff = di;
> float f = *(float*)(buff);
>
> "sldi 9,3,32
Hi,
I would like to have a ping.
BR,
Jeff (Jiufu Guo)
Jiufu Guo writes:
> Hi,
>
> Currently, we have the pattern "movsf_from_si2" which was trying
> to support moving high part DI to SF.
>
> The pattern looks like: XX:SF=bitcast:SF(subreg(YY:DI>>32),0)
> It only accepts the "ashiftrt" for
Hi,
I would like to have a ping.
BR,
Jeff (Jiufu Guo)
Jiufu Guo writes:
> Hi,
>
> For PowerPC, some INT mode and FLOAT modes can be marked as tieable,
> for example: DI<->DF.
> One note SFmode is special, it would only tieable with itself.
>
> I updated previous patch more reasonable:
> ht
Hi,
Andrew MacLeod writes:
> On 9/12/23 21:42, Jiufu Guo wrote:
>> Hi,
>>
>> Richard Biener writes:
>>
>>> On Thu, 7 Sep 2023, Jiufu Guo wrote:
>>>
Hi,
As discussed in PR111303:
For pattern "(X + C) / N": "div (plus@3 @0 INTEGER_CST@1) INTEGER_CST@2)",
Even if "X
Hi,
For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried.
For "get_range_query", it could get more context-aware range info.
And look at the implementation of "get_range_query", it returns
global range if no local fun info.
ATTRIBUTE_RETURNS_NONNULL inline range_query *
get_range_quer
Hi,
Richard Biener writes:
> On Thu, 7 Sep 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> As discussed in PR111303:
>>
>> For pattern "(X + C) / N": "div (plus@3 @0 INTEGER_CST@1) INTEGER_CST@2)",
>> Even if "X" has value-range and "X + C" does not overflow, "@3" may still
>> be undefined. Like below
Hi,
Gentle ping...
BR,
Jeff (Jiufu Guo)
Jiufu Guo writes:
> Hi,
>
> If a constant is possible to be rotated to/from a positive or negative
> value which "li" can generated, then "li;rotldi" can be used to build
> the constant.
>
> Compare with the previous version:
> https://gcc.gnu.org/pipe
Hi,
As discussed in PR111303:
For pattern "(X + C) / N": "div (plus@3 @0 INTEGER_CST@1) INTEGER_CST@2)",
Even if "X" has value-range and "X + C" does not overflow, "@3" may still
be undefined. Like below example:
_3 = _2 + -5;
if (0 != 0)
goto ; [34.00%]
else
goto ; [66.00%]
;; succ:
Hi,
Richard Biener writes:
> On Fri, 1 Sep 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> Integer expression "(X - N * M) / N" can be optimized to "X / N - M" with
>> the below conditions:
>> 1. There is no wrap/overflow/underflow.
>>wrap/overflow/underflow breaks the arithmetic operation.
>> 2. "
Hi,
Integer expression "(X - N * M) / N" can be optimized to "X / N - M" with
the below conditions:
1. There is no wrap/overflow/underflow.
wrap/overflow/underflow breaks the arithmetic operation.
2. "X - N * M" and "X" are not of opposite sign.
Here, the operation "/" would be "trunc_div",
Hi,
As mentioned in PR108338, on p9, we could use mtvsrws to implement
the bitcast from SI to SF (or lowpart DI to SF).
For code:
*(long long*)buff = di;
float f = *(float*)(buff);
"sldi 9,3,32 ; mtvsrd 1,9 ; xscvspdpn 1,1" is generated.
A better one would be "mtvsrws 1,3 ; xscvspdpn 1,1".
Hi,
Currently, we have the pattern "movsf_from_si2" which was trying
to support moving high part DI to SF.
The pattern looks like: XX:SF=bitcast:SF(subreg(YY:DI>>32),0)
It only accepts the "ashiftrt" for ">>", but "lshiftrt" is also ok.
And the offset of "subreg" is hard code 0, which only works
Hi Richard,
Thanks so much for your great review!
Richard Biener writes:
> On Wed, 23 Aug 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> I just updated the patch. We could review this one.
>>
>> Compare with previous patch:
>> https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627287.html
>>
Hi Richard,
Thanks a lot for your great comments!
Richard Biener writes:
> On Tue, 29 Aug 2023, Jiufu Guo wrote:
>
>>
>> Hi Richard,
>>
>> Thanks a lot for your quick reply!
>>
>> Richard Biener writes:
>>
>> > On Tue, 29 Aug 2023, Jiufu Guo wrote:
>> >
>> >>
>> >> Hi All!
>> >>
>> >>
Hi Richard,
Thanks a lot for your quick reply!
Richard Biener writes:
> On Tue, 29 Aug 2023, Jiufu Guo wrote:
>
>>
>> Hi All!
>>
>> "rguenth at gcc dot gnu.org" writes:
>>
>> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66
>> ...
>> >
>> >
>> > At RTL expansion time we store to D.28
Hi Richard,
Thanks a lot for your review!
Richard Biener writes:
> On Wed, 23 Aug 2023, guojiufu wrote:
>
>> Hi,
>>
>> I would like to have a gentle ping...
>>
>> BR,
>> Jeff (Jiufu Guo)
>>
>> On 2023-08-07 10:45, guojiufu via Gcc-patches wrote:
>> > Hi,
>> >
>> > Gentle ping...
>> >
>>
Hi All!
"rguenth at gcc dot gnu.org" writes:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66
...
>
>
> At RTL expansion time we store to D.2865 where it's DECL_RTL is r82:TI so
> we can hardly fix it there. Only a later pass could figure each of the
> insns fully define the reg.
>
> Jiu
Hi,
For PowerPC, some INT mode and FLOAT modes can be marked as tieable,
for example: DI<->DF.
One note SFmode is special, it would only tieable with itself.
I updated previous patch more reasonable:
https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609504.html
Bootstrap and regtest pass on
Hi,
If a constant is possible to be rotated to/from a positive or negative
value which "li" can generated, then "li;rotldi" can be used to build
the constant.
Compare with the previous version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623528.html
This patch just did minor changes to th
Hi,
I just updated the patch. We could review this one.
Compare with previous patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627287.html
This version:
* Supports bitfield access from one register.
* Allow return scalar registers cleaned via contructor.
Bootstrapped and regtested
Hi,
Jiufu Guo writes:
> Hi,
>
> There are a few PRs about the issues on the struct parameters and
> returns, like PRs 69143/65421/108073.
>
> we could consider introducing a light SRA in the expander to
> handle those parameters and returns in aggregate type, if they
> are passed through regis
Hi,
In the light-expander-sra, each statement in each basic-block of a function
need to be analyzed, and there is a similar behavior in checking variable
which need to be stored in the stack.
These per-stmt analyses can be combined to improve cache locality.
Bootstrapped and regtested on x86_64-
Hi,
There are a few PRs about the issues on the struct parameters and
returns, like PRs 69143/65421/108073.
we could consider introducing a light SRA in the expander to
handle those parameters and returns in aggregate type, if they
are passed through registers. For access to the fields of
the pa
xecute (function *fun)
>> >>loop_optimizer_finalize ();
>> >> }
>> >>
>> >> + free_expander_sra ();
>> >> timevar_pop (TV_POST_EXPAND);
>> >>
>> >>return 0;
>> >>
>> + for (int i = 0; i < nregs; i++)
>> + {
>> + rtx reg = gen_rtx_REG (mode, regno + i);
>> + rtx off = GEN_INT (word_size * i);
>> + tmps[i] = gen_rtx_EXPR_LIST (VOIDmode, reg, off);
>> +}
>> +
>> + rtx regs = gen_
Hi,
I would like to have a ping on this patch.
BR,
Jeff (Jiufu Guo)
Jiufu Guo writes:
> Hi,
>
> As discussed in previous reviews, adding overflow APIs to range-op
> would be useful. Those APIs could help to check if overflow happens
> when operating between two 'range's, like: plus, minus,
Hi,
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> Richard Biener writes:
>
>> On Mon, 24 Jul 2023, Jiufu Guo wrote:
>>
>>>
>>> Hi Martin,
>>>
>>> Not sure about your current option about re-using the ipa-sra code
>>> in th
target/powerpc/pr65421-2.c
b/gcc/testsuite/gcc.target/powerpc/pr65421-2.c
new file mode 100644
index 000..8a8e1a0e996
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr65421-2.c
@@ -0,0 +1,32 @@
+/* PR target/65421 */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-targ
need to walk all the stmts.
BR,
Jeff (Jiufu Guo)
Jiufu Guo via Gcc-patches writes:
> Hi Martin,
>
> Jiufu Guo via Gcc-patches writes:
>
>> Hi,
>>
>> Martin Jambor writes:
>>
>>> Hi,
>>>
>>> On Tue, May 30 2023, Richard Biener wrote:
Hi,
As discussed in previous reviews, adding overflow APIs to range-op
would be useful. Those APIs could help to check if overflow happens
when operating between two 'range's, like: plus, minus, and mult.
Previous discussions are here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624067.ht
Hi,
Integer expression "(X - N * M) / N" can be optimized to "X / N - M"
if there is no wrap/overflow/underflow and "X - N * M" has the same
sign with "X".
Compare the previous version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624067.html
- APIs: overflow, nonnegative_p and nonpositi
Hi,
Andrew MacLeod writes:
> On 7/17/23 09:45, Jiufu Guo wrote:
>>
Should we decide we would like it in general, it wouldnt be hard to add to
irange. wi_fold() cuurently returns null, it could easily return a bool
indicating if an overflow happened, and wi_fold_in_parts and fol
Hi,
Richard Biener writes:
> On Fri, 14 Jul 2023, Andrew MacLeod wrote:
>
>>
>> On 7/14/23 09:37, Richard Biener wrote:
>> > On Fri, 14 Jul 2023, Aldy Hernandez wrote:
>> >
>> >> I don't know what you're trying to accomplish here, as I haven't been
>> >> following the PR, but adding all these
Hi Andrew, Aldy and Richard,
Thanks a lot for all your very helpful comments!
Andrew MacLeod writes:
> On 7/14/23 09:37, Richard Biener wrote:
>> On Fri, 14 Jul 2023, Aldy Hernandez wrote:
>>
>>> I don't know what you're trying to accomplish here, as I haven't been
>>> following the PR, but a
Hi Martin,
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> Martin Jambor writes:
>
>> Hi,
>>
>> On Tue, May 30 2023, Richard Biener wrote:
>>> On Mon, 29 May 2023, Jiufu Guo wrote:
>>>
>>>> Hi,
>>>>
>>>> Previ
Hi,
Integer expression "(X - N * M) / N" can be optimized to "X / N - M"
if there is no wrap/overflow/underflow and "X - N * M" has the same
sign with "X".
Compare the previous version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623028.html
- The APIs for checking overflow of range opera
Hi Richard/Andrew!
Richard Biener writes:
> On Thu, 29 Jun 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> Jiufu Guo writes:
>>
>> > Hi,
>> >
>> > Integer expression "(X - N * M) / N" can be optimized to "X / N - M" if
>> > there is no wrap/overflow/underflow and "X - N * M" has the same sign
>>
Hi,
I just submit a new version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623533.html
So, we could ignore this ping and check the new version.
BR,
Jeff (Jiufu Guo)
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> Gentle ping ...
>
> Jiufu Guo via Gcc-patches writes:
&
Hi,
As mentioned in PR108338, on p9, we could use mtvsrws to implement
the bitcast from SI#0 to SF (or lowpart DI to SF).
For code:
*(long long*)buff = di;
float f = *(float*)(buff);
"sldi 9,3,32 ; mtvsrd 1,9 ; xscvspdpn 1,1" is generated.
But "mtvsrws 1,3 ; xscvspdpn 1,1" would be better.
Hi,
Gentle ping ...
Jiufu Guo via Gcc-patches writes:
> Gentle ping...
>
> Jiufu Guo via Gcc-patches writes:
>
>> Gentle ping...
>>
>> Jiufu Guo via Gcc-patches writes:
>>
>>> Hi
>>>
>>> I would like to ping this patch for stag
Hi,
If a constant is possible to be rotated to/from a positive or negative
value from "li", then "li;rotldi" can be used to build the constant.
Compare with the previous version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621961.html
This patch just did minor changes to the style and com
Hi,
Jiufu Guo via Gcc-patches writes:
> Hi!
>
> Segher Boessenkool writes:
>
>> Hi!
>>
>> On Fri, Jun 16, 2023 at 04:34:12PM +0800, Jiufu Guo wrote:
>>> +/* Check if value C can be built by 2 instructions: one is 'li', another is
>>
Hi,
Jiufu Guo writes:
> Hi,
>
> Integer expression "(X - N * M) / N" can be optimized to "X / N - M" if
> there is no wrap/overflow/underflow and "X - N * M" has the same sign
> with "X".
>
> Compare with the previous version:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620896.html
>
Hi,
Integer expression "(X - N * M) / N" can be optimized to "X / N - M" if
there is no wrap/overflow/underflow and "X - N * M" has the same sign
with "X".
Compare with the previous version:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620896.html
This version changes:
1. Remove the behavi
Hi!
David Edelsohn writes:
> This Message Is From an External Sender
> This message came from outside your organization.
>
> On Tue, May 30, 2023 at 11:00 PM Jiufu Guo wrote:
>
> Gentle ping...
>
> Jiufu Guo via Gcc-patches writes:
>
> > Gentle pi
Hi,
Richard Biener writes:
> On Fri, 16 Jun 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> The const_anchor in cse.cc supports integer constants only.
>> There is a "gcc_assert (SCALAR_INT_MODE_P (mode))" in
>> try_const_anchors.
>>
>> In the latest code, some non-integer modes are used with const in
Hi!
Segher Boessenkool writes:
> Hi!
>
> On Fri, Jun 16, 2023 at 04:34:12PM +0800, Jiufu Guo wrote:
>> +/* Check if value C can be built by 2 instructions: one is 'li', another is
>> + rotldi.
>> +
>> + If so, *SHIFT is set to the shift operand of rotldi(rldicl), and *MASK
>> + is set to
Hi,
If a constant is possible to be rotated to/from a positive or negative
value from "li", then "li;rotldi" can be used to build the constant.
Compare with the previous version, those one-line abstraction codes are
removed.
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621001.html
Bootstr
Hi,
The const_anchor in cse.cc supports integer constants only.
There is a "gcc_assert (SCALAR_INT_MODE_P (mode))" in
try_const_anchors.
In the latest code, some non-integer modes are used with const int.
For examples:
"set (mem/c:BLK (xx) (const_int 0 [0])" occur in md files of
rs6000, i386, arm
Hi,
Segher Boessenkool writes:
> On Thu, Jun 15, 2023 at 03:00:40PM +0800, Jiufu Guo wrote:
>> >> This is the existing pattern. It may be read as an action
>> >> to clean an unknown-size memory block.
>> >
>> > Including a size zero memory block, yes. BLKmode was originally to do
>> > th
Hi,
Segher Boessenkool writes:
> Hi!
>
> On Wed, Jun 14, 2023 at 05:18:15PM +0800, Xi Ruoyao wrote:
>> The generic issue here is to fix (not "papering over") the signed
>> overflow, we need to perform the addition in a target machine mode. We
>> may always use Pmode (IIRC const_anchor was int
Hi,
Segher Boessenkool writes:
> Hi!
>
> On Wed, Jun 14, 2023 at 12:06:29PM +0800, Jiufu Guo wrote:
>> Segher Boessenkool writes:
>> I'm also thinking about other solutions:
>> 1. "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [0])"
>> This is the existing pattern. It may be read as an action
Hi,
Richard Sandiford writes:
> Richard Biener writes:
>> AFAIU this special instruction is only supposed to prevent
>> code motion (of stack memory accesses?) across this instruction?
>> I'd say a
>>
>> (may_clobber (mem:BLK (reg:DI 1 1)))
>>
>> might be more to the point? I've used "may_
Hi,
Richard Biener writes:
> On Wed, 14 Jun 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> Segher Boessenkool writes:
>>
>> > Hi!
>> >
>> > As I said in a reply to the original patch: not okay. Sorry.
>>
>> Thanks a lot for your comments!
>> I'm also thinking about other solutions:
>> 1. "set
Hi,
Segher Boessenkool writes:
> Hi!
>
> As I said in a reply to the original patch: not okay. Sorry.
Thanks a lot for your comments!
I'm also thinking about other solutions:
1. "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [0])"
This is the existing pattern. It may be read as an action
t
Hi Segher, David,
David Edelsohn writes:
> On Tue, Jun 13, 2023 at 2:16 PM Segher Boessenkool
> wrote:
>>
>> Hi!
>>
>> On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote:
>> > David Edelsohn writes:
>> > >
>> > > This definitely seems to be a better solution.
>> > >
>> > > The TARGET_
Hi,
Xi Ruoyao writes:
> On Tue, 2023-06-13 at 20:23 +0800, Jiufu Guo via Gcc-patches wrote:
>
>> Compare with previous version, this addes ChangeLog and removes
>> const_anchor parts.
>> https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621356.html.
>
> [Off t
Hi,
David Edelsohn writes:
> On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote:
>>
>>
>> Hi David,
>>
>> David Edelsohn writes:
>> > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote:
>> >
>> > Hi,
>> >
>> > This patch checks if a constant is possible to be rotated to/from a
>> > positive
>>
Hi,
For stack_tie, currently below insn is generated:
(insn 15 14 16 3 (parallel [
(set (mem/c:BLK (reg/f:DI 1 1) [1 A8])
(const_int 0 [0]))
]) "/home/guojiufu/temp/gdb.c":13:3 922 {stack_tie}
(nil))
It is "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [
Hi David,
Thanks for your valuable comments!
David Edelsohn writes:
>
> On Wed, Jun 7, 2023 at 9:56 PM Jiufu Guo wrote:
>
> Hi,
>
> This patch checks if a constant is possible to be built by "li;rldic".
> We only need to take care of "negative li", other forms do not need to check.
> Fo
Hi,
David Edelsohn writes:
>
> On Wed, Jun 7, 2023 at 9:56 PM Jiufu Guo wrote:
>
> Hi,
>
> This patch checks if a constant is possible left/right cleaned on a rotated
> value from a negative value of "li/lis". If so, we can build the constant
> through "li/lis ; rldicl/rldicr".
>
> Boo
Hi David,
David Edelsohn writes:
> On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote:
>
> Hi,
>
> This patch checks if a constant is possible to be rotated to/from a positive
> or negative value from "li". If so, we could use "li;rotldi" to build it.
>
> Bootstrap and regtest pass on ppc64{,l
Hi,
Jeff Law writes:
> On 5/10/23 19:20, Jiufu Guo wrote:
>>
>> Hi,
>>
>> I would like to ping:
>> https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609396.html
>>
>> We know there are a few issues related to aggregate parameter and
>> returns. I'm thinking if it is ok for trunk to use t
Hi,
Jeff Law writes:
> On 6/11/23 23:44, Jiufu Guo wrote:
>> Richard Biener writes:
>>
>>> On Fri, 9 Jun 2023, Jiufu Guo wrote:
>>>
Hi,
Richard Biener writes:
> On Fri, 9 Jun 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> Richard Biener writes:
>>>
Hi David,
David Edelsohn writes:
> Hi, Jiufu
>
> This definitely seems to be a better solution.
>
> The TARGET_CONST_ANCHOR change should not be part of this patch. Also
> there is no ChangeLog for the patch.
Thanks a lot for your quick review!! And sorry for the sending this patch
in a hurr
Hi,
For stack_tie, currently below insn is generated:
(insn 15 14 16 3 (parallel [
(set (mem/c:BLK (reg/f:DI 1 1) [1 A8])
(const_int 0 [0]))
]) "/home/guojiufu/temp/gdb.c":13:3 922 {stack_tie}
(nil))
It is "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [
Hi,
Richard Biener writes:
> On Mon, 12 Jun 2023, Jiufu Guo wrote:
>
>> Richard Biener writes:
>>
>> > On Fri, 9 Jun 2023, Jiufu Guo wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> Richard Biener writes:
>> >>
>> >> > On Fri, 9 Jun 2023, Jiufu Guo wrote:
>> >> >
>> >> >>
>> >> >> Hi,
>> >> >>
Richard Biener writes:
> On Fri, 9 Jun 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> Richard Biener writes:
>>
>> > On Fri, 9 Jun 2023, Jiufu Guo wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> Richard Biener writes:
>> >>
>> >> > On Fri, 9 Jun 2023, Richard Sandiford wrote:
>> >> >
>> >> >> guojiufu
Hi,
Thanks for your comments!
Segher Boessenkool writes:
> Hi!
>
> On Wed, Jun 07, 2023 at 04:21:11PM +0800, Jiufu Guo wrote:
>> This patch tries to optimize "(X - N * M) / N" to "X / N - M".
>> For C code, "/" towards zero (trunc_div), and "X - N * M" maybe
>> wrap/overflow/underflow. So, it
Hi,
Richard Biener writes:
> On Wed, 7 Jun 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> This patch tries to optimize "(X - N * M) / N" to "X / N - M".
>> For C code, "/" towards zero (trunc_div), and "X - N * M" maybe
>> wrap/overflow/underflow. So, it is valid that "X - N * M" does
>> not cross zer
Hi,
Richard Biener writes:
> On Fri, 9 Jun 2023, Jiufu Guo wrote:
>
>>
>> Hi,
>>
>> Richard Biener writes:
>>
>> > On Fri, 9 Jun 2023, Richard Sandiford wrote:
>> >
>> >> guojiufu writes:
>> >> > Hi,
>> >> >
>> >> > On 2023-06-09 16:00, Richard Biener wrote:
>> >> >> On Fri, 9 Jun 2023, J
Hi,
Richard Biener writes:
> On Fri, 9 Jun 2023, Richard Sandiford wrote:
>
>> guojiufu writes:
>> > Hi,
>> >
>> > On 2023-06-09 16:00, Richard Biener wrote:
>> >> On Fri, 9 Jun 2023, Jiufu Guo wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> As checking the code, there is a "gcc_assert (SCALAR_INT_MO
Hi,
As checking the code, there is a "gcc_assert (SCALAR_INT_MODE_P (mode))"
in "try_const_anchors".
This assert seems correct because the function try_const_anchors cares
about integer values currently, and modes other than SCALAR_INT_MODE_P
are not needed to support.
This patch makes sure SCALA
Hi,
This patch checks if a constant is possible left/right cleaned on a rotated
value from a negative value of "li/lis". If so, we can build the constant
through "li/lis ; rldicl/rldicr".
Bootstrap and regtest pass on ppc64{,le}.
Is this ok for trunk?
BR,
Jeff (Jiufu)
gcc/ChangeLog:
*
Hi,
This patch checks if a constant is possible to be rotated to/from a negative
value from "lis". If so, we could use "lis;rotldi" to build it.
The positive value of "lis" does not need to be analyzed. Because if a
constant can be rotated from the positive value of "lis", it also can be
rotated
Hi,
This patch checks if a constant is possible to be built by "li;rldic".
We only need to take care of "negative li", other forms do not need to check.
For example, "negative lis" is just a "negative li" with an additional shift.
Bootstrap and regtest pass on ppc64{,le}.
Is this ok for trunk?
B
Hi,
This patch checks if a constant is possible to be rotated to/from a positive
or negative value from "li". If so, we could use "li;rotldi" to build it.
Bootstrap and regtest pass on ppc64{,le}.
Is this ok for trunk?
BR,
Jeff (Jiufu)
gcc/ChangeLog:
* config/rs6000/rs6000.cc (can_be_r
Hi,
These patches are just minor changes based on previous version/comments.
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620489.html
And also update the wording for patches in this series.
For a given constant, it would b
Hi,
This patch tries to optimize "(X - N * M) / N" to "X / N - M".
For C code, "/" towards zero (trunc_div), and "X - N * M" maybe
wrap/overflow/underflow. So, it is valid that "X - N * M" does
not cross zero and does not wrap/overflow/underflow.
Compare with previous version:
https://gcc.gnu.org
Hi David,
David Edelsohn writes:
>
> Hi, Jiufu
> * config/rs6000/rs6000.cc (can_be_rotated_to_possitive_li): New
> function.
> (can_be_rotated_to_negative_li): New function.
> (can_be_built_by_li_and_rotldi): New function.
> (rs6000_emit_set_long_const): Call can_be_b
Hi David,
Thanks!
David Edelsohn writes:
> This Message Is From an External Sender
> This message came from outside your organization.
>
> On Tue, May 30, 2023 at 11:00 PM Jiufu Guo wrote:
>
> Gentle ping...
>
> Jiufu Guo via Gcc-patches writes:
>
> &g
Hi,
Richard Biener writes:
> On Mon, 29 May 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> Previously, I was investigating some struct parameters and returns related
>> PRs 69143/65421/108073.
>>
>> Investigating the issues case by case, and drafting patches for each of
>> them one by one. This would
Hi,
Martin Jambor writes:
> Hi,
>
> On Tue, May 30 2023, Richard Biener wrote:
>> On Mon, 29 May 2023, Jiufu Guo wrote:
>>
>>> Hi,
>>>
>>> Previously, I was investigating some struct parameters and returns related
>>> PRs 69143/65421/108073.
>>>
>>> Investigating the issues case by case, and
Hi,
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> Richard Biener writes:
>
>> On Wed, 17 May 2023, Jiufu Guo wrote:
>>
>>> Hi,
>>>
>>> This patch tries to optimize "(X - N * M) / N + M" to "X / N".
>>
>> But if t
Hi,
Richard Biener writes:
> On Wed, 17 May 2023, Jiufu Guo wrote:
>
>> Hi,
>>
>> This patch tries to optimize "(X - N * M) / N + M" to "X / N".
>
> But if that's valid why not make the transform simpler and transform
> (X - N * M) / N to X / N - M instead?
Great catch!
If "N * M" is not co
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Gentle ping...
>
> Jiufu Guo via Gcc-patches writes:
>
>> Hi,
>>
>> I'm thinking that we may enable this patch for stage1, so ping it.
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-Oct
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> I would like to ping these patches.
> [0/4]
> https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html
> [1/4]
> https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611287.html
> [2/4]
> ht
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Gentle ping...
>
> Jiufu Guo via Gcc-patches writes:
>
>> Hi
>>
>> I would like to ping this patch for stage1:
>> https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612168.html
>>
>
Hi,
Previously, I was investigating some struct parameters and returns related
PRs 69143/65421/108073.
Investigating the issues case by case, and drafting patches for each of
them one by one. This would help us to enhance code incrementally.
While, this way, patches would interact with each other
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> I'm thinking that we may enable this patch for stage1, so ping it.
> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603530.html
>
> BR,
> Jeff (Jiufu)
>
> Jiufu Guo writes:
>
>&
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Hi,
>
> I would ping this patch for stage1:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609504.html
>
> BR,
> Jeff (Jiufu)
>
> Jiufu Guo via Gcc-patches writes:
>
>> Hi,
>>
>> G
Gentle ping...
Jiufu Guo via Gcc-patches writes:
> Hi
>
> I would like to ping this patch for stage1:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612168.html
>
> BR,
> Jeff (Jiufu)
>
> Jiufu Guo writes:
>
>> Hi,
>>
>> Compa
Hi,
This patch tries to optimize "(X - N * M) / N + M" to "X / N".
As per the discussions in PR108757, we know this transformation is valid
only under some conditions.
For C code, "/" towards zero (trunc_div), and "X - N * M"
maybe wrap/overflow/underflow. So, it is valid that "X - N * M" does
not
Hi,
I would like to ping:
https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609396.html
We know there are a few issues related to aggregate parameter and
returns. I'm thinking if it is ok for trunk to use this patch to
resolve part of those issues.
BR,
Jeff (Jiufu)
Jiufu Guo vi
Hi,
Jeff Law writes:
> On 5/3/23 23:49, guojiufu wrote:
>> Hi,
>>
>> On 2023-05-01 03:00, Jeff Law wrote:
>>> On 3/16/23 21:39, Jiufu Guo wrote:
Hi,
When assigning a parameter to a variable, or assigning a variable to
return value with struct type, and the parameter/return
Hi,
I would like to ping this for comments.
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611821.html
In this patch, "subreg:DI (x:SI)" is used. I' thinking that this
may be a concern, while it maybe acceptable for current code.
BR,
Jeff (Jiufu)
Jiufu Guo writes:
> Hi,
>
> Compare w
Hi,
I'm thinking that we may enable this patch for stage1, so ping it.
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603530.html
BR,
Jeff (Jiufu)
Jiufu Guo writes:
> Hi,
>
> There is a functionality as const_anchor in cse.cc. This const_anchor
> supports to generate new constants thr
/gcc-patches/2023-February/611289.html
[4/4]
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611290.html
Any sugguestions for the code functionality/style or to make
it easy for review, please point out, thanks in advance!
BR,
Jeff (Jiufu)
Jiufu Guo via Gcc-patches writes:
>
1 - 100 of 386 matches
Mail list logo