[PATCH] Fix generic shift expansion when shift amount is 0

Paweł Bylica chfast at gmail.com
Wed Feb 18 08:12:03 PST 2015


You are right, that fix works for my case too.

In original code, e.g. when lowering i128 to 2 x i64, and shift amount is 0, one of the words needs to be zerod with shift by 64. That will not work as X86 architecture would execute it as shift by (64 mod 64 = 0).

I have an idea for improvement: if shift amount is zero there is no need to compute anything more. The select that takes `isZero` into account can be placed up front.

Can I be an reviewer for that change?


http://reviews.llvm.org/D4978

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list