[PATCH] [IR] Fix the definition of 'shl nsw'

David Majnemer david.majnemer at gmail.com
Tue Apr 7 23:46:55 PDT 2015


In http://reviews.llvm.org/D8890#153126, @chandlerc wrote:

> FWIW, I really liked having a definition explicit in terms of what kinds of bits can be shifted out. I think its good to *both* define this from first principles of where bits move in the shift operation, *and* how it should relate to an NSW multiply by a power of two.
>
> Unsure when after when we chatted this wording went away, but I'd really like to keep it.


The explicit definition gets hairy very quickly.  It didn't correctly handle `shl nsw i32 1073741824, 1` or `shl nsw i32 -1, 31`.


http://reviews.llvm.org/D8890

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






More information about the llvm-commits mailing list