This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
There are several situations that combine.c:change_zero_ext does not handle well yet. One of them is (and:SI (subreg:SI (zero_extract:DI (reg:DI) ...) ...) (with const_int operands to "and" and "zero_extract") => (and:SI (subreg:SI (and:DI (lshiftrt:DI ...))) with two nested "and"s. Another one is (zero_extract:DI (foo:SI) ...) which is ignored by change_zero_ext. Attached are two experimental patches: 0001-* Deal with mode expanding zero_extracts in change_zero_ext. The patch looks good to me, but not sure whether endianness is handled properly. Is the second argument of gen_rtx_SUBREG correct? 0002-* This is a work in progress with the goal of fixing the first problem and similar ones by calling simplify_set after change_zero_ext to get rid of the overly complex code. That works fine in principle, but replaces back the (and (lshiftrt ...) ...) that change_zero_ext generates back into zero_extract form. Fiddling with simplify_set and make_compound_operation* a bit, trying to suppress undoing the transformations that change_zero_ext has just done, resulted in the (unfinished) patch. As it's not clear to me whether this is a valid approach I'd appreciate any advice on the patch or alternative ways of doing that. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany
Attachment:
0001-combine-Handle-mode-expanding-zero_extracts-in-chang.patch
Description: Text document
Attachment:
0002-combine-Call-simplify_set-after-change_zero_ext.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |