Extend known bits to understand @llvm.bswap
authorPhilip Reames <listmail@philipreames.com>
Tue, 6 Oct 2015 20:20:45 +0000 (20:20 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 6 Oct 2015 20:20:45 +0000 (20:20 +0000)
commit8b2dfae47acde261683f3b27dad58dcf74843315
treee939345c5ed9fca30a591e9815b0c918d5a00888
parent52098de6407acfc9311893a3867a349acc2aaf26
Extend known bits to understand @llvm.bswap

This is a cleaned up patch from the one written by John Regehr based on the findings of the Souper superoptimizer.

When writing tests, I was surprised to find that instsimplify apparently doesn't know how to collapse bit test sequences based purely on known bits. This required me to split my tests across both instsimplify and instcombine.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249453 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/bswap-known-bits.ll [new file with mode: 0644]
test/Transforms/InstSimplify/bswap.ll [new file with mode: 0644]