[WebAssembly] Teach address folding to fold bitwise-or nodes.
authorDan Gohman <dan433584@gmail.com>
Mon, 22 Feb 2016 20:04:02 +0000 (20:04 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 22 Feb 2016 20:04:02 +0000 (20:04 +0000)
commit3b09d279be164f3e9a16b18eced38ee75a00e6fe
treed234074f36799119b3d5d148443d5c21eb8b1c8a
parent56da313e866ddebe7f1188825346b0c31efd03fa
[WebAssembly] Teach address folding to fold bitwise-or nodes.

LLVM converts adds into ors when it can prove that the operands don't share
any non-zero bits. Teach address folding to recognize or instructions with
constant operands with this property that can be folded into addresses as
if they were adds.

llvm-svn: 261562
llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
llvm/test/CodeGen/WebAssembly/offset.ll