[InstCombine] Remove redundant @llvm.assume intrinsics
authorHal Finkel <hfinkel@anl.gov>
Sat, 4 Oct 2014 21:27:06 +0000 (21:27 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 4 Oct 2014 21:27:06 +0000 (21:27 +0000)
commita5fda70c1316cffa8af0d7d835fcd421f498b4ff
treef8828d7efd1442790b475c10e1dedc6545b70a84
parent30d433dcc2c5a766d2c8973075bb66b4b830cb81
[InstCombine] Remove redundant @llvm.assume intrinsics

For any @llvm.assume intrinsic, if there is another which dominates it and uses
the same condition, then it is redundant and can be removed. While this does
not alter the semantics of the @llvm.assume intrinsics, it makes subsequent
handling more efficient (and the resulting IR easier to read).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219067 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/assume-redundant.ll [new file with mode: 0644]