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@?
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
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
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
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
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"
[
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93453
Segher Boessenkool changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|