[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2020-01-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-11-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 --- Comment #6 from Segher Boessenkool --- (In reply to Richard Earnshaw from comment #5) > What I've shown is equivalent to (minus (minus (A) (B)) (C)), which is what > combine produces today. Are you saying that the documentation disagrees on

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-11-01 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 --- Comment #5 from Richard Earnshaw --- (In reply to Segher Boessenkool from comment #4) > (In reply to Richard Earnshaw from comment #2) > > Yes, but since > > (A - B) - C = A - B - C = A - C - B = (A - C) - B > > we can clearly swap the

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-10-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 --- Comment #4 from Segher Boessenkool --- (In reply to Richard Earnshaw from comment #2) > Yes, but since > (A - B) - C = A - B - C = A - C - B = (A - C) - B > we can clearly swap the order of the two RHS operands here. My intent was to

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-10-31 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 --- Comment #3 from Richard Earnshaw --- As for 'special' regs and their ordering, I'm not sure. I would suggest that if we have a commutative operation with two registers and one of the registers is marked as a pointer, then it should appear

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-10-31 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 --- Comment #2 from Richard Earnshaw --- (In reply to Segher Boessenkool from comment #1) > (In reply to Richard Earnshaw from comment #0) > > > Failed to match this instruction: > > (set (reg:SI 125 [+4 ]) > > (minus:SI (minus:SI (reg:SI

[Bug rtl-optimization/92281] Inconsistent canonicalization of (minus (minus A B) C)

2019-10-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92281 Segher Boessenkool changed: What|Removed |Added CC||segher at gcc dot gnu.org ---