llvm/lib/Transforms/InstCombine
Charlie Turner 424da54881 [InstCombine] Recognize another bswap idiom.
Summary:
The byte-swap recognizer can now notice that this

```
uint32_t bswap(uint32_t x)
{
  x = (x & 0x0000FFFF) << 16 | (x & 0xFFFF0000) >> 16;
  x = (x & 0x00FF00FF) << 8 | (x & 0xFF00FF00) >> 8;
  return x;
}
```
    
is a bswap. Fixes PR23863.

Reviewers: nlewycky, hfinkel, hans, jmolloy, rengolin

Subscribers: majnemer, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D12637

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248482 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-24 10:24:58 +00:00
..
CMakeLists.txt
InstCombineAddSub.cpp
InstCombineAndOrXor.cpp [InstCombine] Recognize another bswap idiom. 2015-09-24 10:24:58 +00:00
InstCombineCalls.cpp [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR 2015-09-23 08:48:33 +00:00
InstCombineCasts.cpp
InstCombineCompares.cpp [InstCombine] FoldICmpCstShrCst failed for ashr when comparing against -1 2015-09-19 00:48:31 +00:00
InstCombineInternal.h add ShouldChangeType() variant that takes bitwidths 2015-09-21 16:09:37 +00:00
InstCombineLoadStoreAlloca.cpp Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan. (Complete version of r247497. See D12886) 2015-09-18 19:14:35 +00:00
InstCombineMulDivRem.cpp
InstCombinePHI.cpp [InstCombine] Preserve metadata when merging loads that are phi 2015-09-23 18:40:57 +00:00
InstCombineSelect.cpp
InstCombineShifts.cpp
InstCombineSimplifyDemanded.cpp [InstCombine] Added vector demanded bits support for SSE4A EXTRQ/INSERTQ instructions 2015-09-17 20:32:45 +00:00
InstCombineVectorOps.cpp
InstructionCombining.cpp add ShouldChangeType() variant that takes bitwidths 2015-09-21 16:09:37 +00:00
LLVMBuild.txt
Makefile