Re: [PATCH] Fix PR 93044: extra cast is not removed

2023-07-25 Thread Richard Biener via Gcc-patches
On Tue, Jul 25, 2023 at 1:49 AM Andrew Pinski via Gcc-patches wrote: > > In this case we are not removing convert to a bigger size > back to the same size (or smaller) if signedness does not > match. > For an example: > ``` > signed char _1; > ... > _1 = *a_4(D); > b_5 = (short unsigned int)

[PATCH] Fix PR 93044: extra cast is not removed

2023-07-24 Thread Andrew Pinski via Gcc-patches
In this case we are not removing convert to a bigger size back to the same size (or smaller) if signedness does not match. For an example: ``` signed char _1; ... _1 = *a_4(D); b_5 = (short unsigned int) _1; _2 = (unsigned char) b_5; ``` The inner cast is not needed and can be removed but w