[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #9 from Segher Boessenkool --- Yeah that looks better already, thanks. Please get rid of the debug stuff still in here, and send to gcc-patches@?

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-24 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #8 from HaoChen Gui --- I refined the patch and put all things in a helper - change_pseudo_and_mask. As you mentioned, it's still a band-aid. The perfect solution might be a better version of nonzero_bits. Thanks. diff --git a/gcc/co

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-23 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #7 from Segher Boessenkool --- (In reply to HaoChen Gui from comment #6) > Yes, I found that the nonzero_bits doesn't return exact value in other > pass. It returns a different value. Neither is "exact". The version used by combi

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-22 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #6 from HaoChen Gui --- Sehger, Yes, I found that the nonzero_bits doesn't return exact value in other pass. So calling nonzero_bits in md file is bad as it can't be recognized in other pass. Right now I want to convert a single

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-22 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #5 from Segher Boessenkool --- (In reply to HaoChen Gui from comment #4) > (define_insn_and_split "*rotl3_insert_8" > [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") > (plus_ior_xor:GPR (ashift:GPR (match_operand:GPR 1 "g

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-15 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #4 from HaoChen Gui --- For the second issue, I drafted following insn_and_split pattern. It tries to combine the shift and ior when the nonzero_bits of operands[3] matches the condition. (define_insn_and_split "*rotl3_insert_8" [

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-09 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 --- Comment #3 from Segher Boessenkool --- Splitters run after all RTL transforms, so anything that can be done on the split result has to be done manually. This does not scale. Splitters are not suitable for this kind of thing. You can do def

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2021-11-08 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 HaoChen Gui changed: What|Removed |Added CC||guihaoc at gcc dot gnu.org --- Comment #2

[Bug target/93453] PPC: rldimi not taken into account to avoid shift+or

2020-01-28 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|