Strength reduce SAR into SHR if there is no way sign bits could be shifted
authorChris Lattner <sabre@nondot.org>
Sun, 8 May 2005 17:34:56 +0000 (17:34 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 8 May 2005 17:34:56 +0000 (17:34 +0000)
commit120347e8d115cf40aed10e63d406713b46f327df
treeecc3069a9f0eb1fa6d2b4cd8f64779994478c2f2
parenta9c83c73daa8eb5410ff17be9b19218245b52de2
Strength reduce SAR into SHR if there is no way sign bits could be shifted
in.  This tends to get cases like this:

  X = cast ubyte to int
  Y = shr int X, ...

Tested by: shift.ll:test24

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21775 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp