[PATCH] Fix generic shift expansion when shift amount is 0
Paweł Bylica
chfast at gmail.com
Fri Mar 13 16:55:17 PDT 2015
In http://reviews.llvm.org/D4978#140660, @sanjoy wrote:
> For a left shift, I think `HiResult` can be `HiInput << ShiftAmt | BEXTR LoInput, Start = (WordSize - ShiftAmt), Len = ShiftAmt`. This will do the right thing for `ShiftAmt = 0`.
>
> I think many x86 CPUs do not support `BEXTR` so either this will have be a target dependent thing, or have to be a pattern that the DAG combiner will fold into a `BEXTR`.
>
> In any case, this is very minor.
`BEXTR` would be useful only if shift amount is constant. I think this case is opposite.
http://reviews.llvm.org/D4978
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list