[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-16 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #12 from Richard Earnshaw --- Author: rearnsha Date: Wed Jan 16 15:22:08 2019 New Revision: 267972 URL: https://gcc.gnu.org/viewcvs?rev=267972=gcc=rev Log: __builtin__overflow issues on AArch64 (redux) (cont) And the ChangeLog for

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-16 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #11 from Richard Earnshaw --- Author: rearnsha Date: Wed Jan 16 15:18:05 2019 New Revision: 267971 URL: https://gcc.gnu.org/viewcvs?rev=267971=gcc=rev Log: __builtin__overflow issues on AArch64 (redux) Further investigation showed

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-07 Thread wilco at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #10 from Wilco --- (In reply to Richard Earnshaw from comment #9) > Fixed. Yes looking at git blame all of the addv/subv support was added for GCC9, so no backporting is needed.

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-07 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 Richard Earnshaw changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-07 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #8 from Richard Earnshaw --- Author: rearnsha Date: Mon Jan 7 14:49:00 2019 New Revision: 267650 URL: https://gcc.gnu.org/viewcvs?rev=267650=gcc=rev Log: Investigating PR target/86891 revealed a number of issues with the way the

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-07 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 Richard Earnshaw changed: What|Removed |Added Assignee|wilco at gcc dot gnu.org |rearnsha at gcc dot gnu.org

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #6 from Jakub Jelinek --- Not everything is optimized during GIMPLE optimizations, we have simplify-rtx.c and combine.c for a reason. So, if it is possible to accurately describe the behavior of the instruction without UNSPECs, it

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-03 Thread wilco at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #5 from Wilco --- (In reply to Richard Earnshaw from comment #4) > Yes, the extension should be zero-extend, not sign extend. The plus > operation is correct, however, since decrementing the first operand could > lead to underflow

[Bug target/86891] [9 Regression] __builtin_sub_overflow incorrect for unsigned types

2019-01-03 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891 --- Comment #4 from Richard Earnshaw --- Yes, the extension should be zero-extend, not sign extend. The plus operation is correct, however, since decrementing the first operand could lead to underflow if it was zero. So the correct rtl would