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]

Re: [RFT] PR19154: New AVR bit extraction patter


+ return (AS2 (and,%A0,%3) CR_TAB

oops I think you wanted to clear %A0 - that's not what it does. I think you are "done for" when operand[1]=operand[0] -at least I could not see a neat work around.

How about define and split to create:

(X & n) ? 1 : 0

This will be handled by existing define insn that use sbrs/c (Im checking to see if code is "perfect")

gcc presently will convert this in "c" to the bit extraction (same as your testcase) but
I think a define and split will keep it intact.







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]