diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2014-12-04 09:44:01 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2014-12-04 09:44:01 +0000 |
commit | be24ab367b0a9ccaa6c1e8653524ff81320deb33 (patch) | |
tree | ad2269e1fe9234700a693d921e09cfa3a27f6d5f /llvm/lib/CodeGen/MachineSink.cpp | |
parent | f1de34b84dea91b5060ee0fafbadaad5deaf199c (diff) | |
download | llvm-be24ab367b0a9ccaa6c1e8653524ff81320deb33.zip llvm-be24ab367b0a9ccaa6c1e8653524ff81320deb33.tar.gz llvm-be24ab367b0a9ccaa6c1e8653524ff81320deb33.tar.bz2 |
[InstCombine] Minor optimization for bswap with binary ops
Added instcombine optimizations for BSWAP with AND/OR/XOR ops:
OP( BSWAP(x), BSWAP(y) ) -> BSWAP( OP(x, y) )
OP( BSWAP(x), CONSTANT ) -> BSWAP( OP(x, BSWAP(CONSTANT) ) )
Since its just a one liner, I've also added BSWAP to the DAGCombiner equivalent as well:
fold (OP (bswap x), (bswap y)) -> (bswap (OP x, y))
Refactored bswap-fold tests to use FileCheck instead of just checking that the bswaps had gone.
Differential Revision: http://reviews.llvm.org/D6407
llvm-svn: 223349
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions