https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118476

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So backporting the fix for PR 116412 will also fix the issue here too. But
still leave the latent bug in phiopt.
The reason is that EVRP does the folding of:
Folding statement: iftmp.1_9 = VIEW_CONVERT_EXPR<long unsigned
int[1]>(a)[src_6];


into:
Folded into: iftmp.1_9 = BIT_FIELD_REF <a, 64, 0>;

And the match and simplify changes that into:
Folded into: iftmp.1_9 = VIEW_CONVERT_EXPR<long unsigned int>(a);

BUT with the patch for PR 116412, the conversion of BFR to VCE will no longer
happen since a is a SSA_NAME.

But this also means there might be some missed optimizations now on the trunk
due to that. Let me find a testcase.

I still think a patch like in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116412#c4 is the right way forward
for backporting ...

Reply via email to