Pull in r222856 from upstream llvm trunk (by David Majnemer):

  Revert "Added inst combine transforms for single bit tests from Chris's note"

  This reverts commit r210006, it miscompiled libapr which is used in who
  knows how many projects.

  A test has been added to ensure that we don't regress again.

This fixes a miscompilation in libapr, which caused problems in svnlite.
Add patch file for r275160.