On Tue, Aug 8, 2017 at 10:20 PM, Richard Kenner
<ken...@vlsi1.ultra.nyu.edu> wrote:
>> Correct. It is truncated for integer shift, but not simd shift
>> instructions. We generate a pattern in the split that only generates
>> the integer shift instructions.
>
> That's unfortunate, because it would be nice to do this in simplify_rtx,
> since it's machine-independent, but that has to be conditioned on
> SHIFT_COUNT_TRUNCATED, so you wouldn't get the benefit of it.

SHIFT_COUNT_TRUNCATED should go ... you should express this in
the patterns, like for example with

(define_insn ashlSI3
  [(set (match_operand 0 "")
         (ashl:SI (match_operand ... )
                     (subreg:QI (match_operand:SI ...)))]

or an explicit and:SI and combine / simplify_rtx should apply the magic
optimization we expect.

Richard.

Reply via email to