Check for all known bits on ret in InstCombine
authorHal Finkel <hfinkel@anl.gov>
Sun, 7 Sep 2014 21:28:34 +0000 (21:28 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 7 Sep 2014 21:28:34 +0000 (21:28 +0000)
commit1c0c67a007bd3a90c0340b4e11d6259eec57340b
tree1d15a8c8f8c24cda8f384cbafb3ad6e793060e4e
parent3ef1aae2b51af3074e0ae045b6d576068dacfc01
Check for all known bits on ret in InstCombine

From a combination of @llvm.assume calls (and perhaps through other means, such
as range metadata), it is possible that all bits of a return value might be
known. Previously, InstCombine did not check for this (which is understandable
given assumptions of constant propagation), but means that we'd miss simple
cases where assumptions are involved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217346 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombine.h
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/assume.ll