[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2025-03-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2025-01-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 Jeffrey A. Law changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2025-01-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #12 from GCC Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:cab2e12362287bd50f9abdd7fb5a775138e02d1b commit r15-6902-gcab2e12362287bd50f9abdd7fb5a775138e02d1b Author: Richard Sandiford Date: T

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2024-12-30 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 Jeffrey A. Law changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |law at gcc dot gnu.org --- Comm

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-30 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #10 from Jeffrey A. Law --- Created attachment 55218 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55218&action=edit (Incomplete) Patch

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-30 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #9 from Jeffrey A. Law --- Weird, I don't see the attachment either. I'll extract & upload it again. WRT costing. fwprop and combine will both query the target rtx costs and will reject when the target costing model indicates the

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-29 Thread wangfeng at eswincomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #8 from Feng Wang --- (In reply to Jeffrey A. Law from comment #7) > Attached is what I cobbled together. It doesn't use magic numbers. But it > doesn't yet handle zero extensions in the simplify-rtx code. But I think it > shows t

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-29 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #7 from Jeffrey A. Law --- Attached is what I cobbled together. It doesn't use magic numbers. But it doesn't yet handle zero extensions in the simplify-rtx code. But I think it shows the overall direction fairly well.

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-11 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #6 from Jeffrey A. Law --- I would still rather not introduce special cases for SUBREGs if we can avoid it. I think the question remains whether or not patching simplify-rtx's canonicalize_shift is sufficient to fix this problem (pe

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-05-11 Thread wangfeng at eswincomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #5 from Feng Wang --- I found something interesting, these operations such as zero_extend,sign_extend,zero_extract,sign_extract will be considered as compound operation and will transform to the approriate shifts and AND operations(T

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-04-28 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #4 from Jeffrey A. Law --- If we need to handle subregs here, I would suggest something like this if (SUBREG_P (XEXP (op0, 0)) && subreg_lowpart_p (op0) ... other tests ... That way we know we're extracting the low word of

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-04-24 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 Richard Biener changed: What|Removed |Added Last reconfirmed||2023-04-24 Status|UNCONFIR

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-04-23 Thread wangfeng at eswincomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 --- Comment #2 from Feng Wang --- (In reply to Feng Wang from comment #1) > Hi Jeff, > > I have modified some code according to your suggestion. > In simplify-rtx.cc I add below part in canonicalize_shift: > if ((code == ASHIFTRT) >

[Bug rtl-optimization/109592] Failure to recognize shifts as sign/zero extension

2023-04-23 Thread wangfeng at eswincomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109592 Feng Wang changed: What|Removed |Added CC||wangfeng at eswincomputing dot com --- Com