On Thu, Mar 28, 2013 at 5:34 AM, Wei Mi <w...@google.com> wrote: > I am not familiar how to use define_subst, so I write a patch that > changes define_insn_and_split to define_insn. bootstrapped and > regression tested on x86_64-unknown-linux-gnu. > > A question is: after that change, Is there anyway I can make > targetm.rtx_costs() aware about the truncation, .i.e the cost is only > a "shift" instead of "shift + and".
Please also change all operand 2 predicates to "register_operand". 2013-03-27 Wei Mi <w...@google.com> * config/i386/i386.md: Do shift truncation in define_insn instead of define_insn_and_split. Please write ChangeLog as: * config/i386/i386.md (*ashl<mode>3_mask): Rewrite as define_insn. Truncate operand 2 using %b asm operand modifier. (*<shift_insn><mode>3_mask): Ditto. (*<rotate_insn><mode>3_mask): Ditto. OK for mainline and all release branches with these changes. Thanks, Uros.