[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED See Also|

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #12 from GCC Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:415091f09096a0ebba1fdcd4af8c2fda24cfd411 commit r14-9588-g415091f09096a0ebba1fdcd4af8c2fda24cfd411 Author: liuhongt Date: Mon

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #11 from Andrew Pinski --- (In reply to Paul Eggert from comment #10) > (In reply to Jakub Jelinek from comment #6) > > You can use -fexcess-precision=16 if you don't want treating _Float16 and > > __bf16 as having excess precision.

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-20 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #10 from Paul Eggert --- (In reply to Jakub Jelinek from comment #6) > You can use -fexcess-precision=16 if you don't want treating _Float16 and > __bf16 as having excess precision. With excess precision, I think the above >

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-18 Thread liuhongt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #9 from Hongtao Liu --- (In reply to Richard Biener from comment #7) > (In reply to Jakub Jelinek from comment #6) > > You can use -fexcess-precision=16 if you don't want treating _Float16 and > > __bf16 as having excess precision.

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #8 from Jakub Jelinek --- (In reply to Richard Biener from comment #7) > (In reply to Jakub Jelinek from comment #6) > > You can use -fexcess-precision=16 if you don't want treating _Float16 and > > __bf16 as having excess

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #7 from Richard Biener --- (In reply to Jakub Jelinek from comment #6) > You can use -fexcess-precision=16 if you don't want treating _Float16 and > __bf16 as having excess precision. With excess precision, I think the above >

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 Richard Biener changed: What|Removed |Added CC||liuhongt at gcc dot gnu.org,

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-15 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #4 from Joseph S. Myers --- I think it's correct that conversions (explicit or implicit) from a value with excess precision convert only once; they don't first remove excess range and precision and then convert to the target type.

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-15 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 Richard Biener changed: What|Removed |Added Keywords||wrong-code CC|

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-14 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #2 from Paul Eggert --- (In reply to Andrew Pinski from comment #1) > I am not so sure that 257.0bf16 gets rounded to 256. It should get rounded to 256, since 257 has no exact representation in __bf16 and 256 is the closest

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347 --- Comment #1 from Andrew Pinski --- Hmm, I am not so sure that 257.0bf16 gets rounded to 256.