Teach InstCombine's ComputeMaskedBits to handle pointer expressions
authorDan Gohman <gohman@apple.com>
Thu, 10 Apr 2008 18:43:06 +0000 (18:43 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 10 Apr 2008 18:43:06 +0000 (18:43 +0000)
commiteee962e1cebb1b70ccd3f5d35f3a5a8c9ba942b5
treed90f6ccf109abe8b81158ffe74a3dfae18b24235
parent172b70c62a315de654a4d1683dbb5544e67afa90
Teach InstCombine's ComputeMaskedBits to handle pointer expressions
in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment
as a ComputeMaskedBits problem, moving all of its special alignment
knowledge to ComputeMaskedBits as low-zero-bits knowledge.

Also, teach ComputeMaskedBits a few basic things about Mul and PHI
instructions.

This improves ComputeMaskedBits-based simplifications in a few cases,
but more noticeably it significantly improves instcombine's alignment
detection for loads, stores, and memory intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49492 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/align-2d-gep.ll [new file with mode: 0644]
test/Transforms/InstCombine/align-addr.ll [new file with mode: 0644]