SuccessChanges

Summary

  1. [NFC][InstCombine] conditional sign-extend of high-bit-extract: 'and' (details)
  2. [InstCombine] conditional sign-extend of high-bit-extract: 'or' pattern. (details)
Commit f7aec25d4fb193c2efb5c8bdcecd6d0611183bcc by lebedev.ri
[NFC][InstCombine] conditional sign-extend of high-bit-extract: 'and'
pat. can be 'or' pattern.
In this pattern, all the "magic" bits that we'd add are all high sign
bits, and in the value we'd be adding to they are all unset, not
unexpectedly, so we can have an `or` there:
https://rise4fun.com/Alive/ups
llvm-svn: 375377
The file was modifiedllvm/test/Transforms/InstCombine/conditional-variable-length-signext-after-high-bit-extract.ll
Commit 7015a5c54b53d8d2297a3aa38bc32aab167bdcfc by lebedev.ri
[InstCombine] conditional sign-extend of high-bit-extract: 'or' pattern.
In this pattern, all the "magic" bits that we'd `add` are all high sign
bits, and in the value we'd be adding to they are all unset, not
unexpectedly, so we can have an `or` there:
https://rise4fun.com/Alive/ups
It is possible that `haveNoCommonBitsSet()` should be taught about this
pattern so that we never have an `add` variant, but the reasoning would
need to be recursive (because of that `select`), so i'm not really sure
that would be worth it just yet.
llvm-svn: 375378
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/test/Transforms/InstCombine/conditional-variable-length-signext-after-high-bit-extract.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp