EarlyCSE should ignore calls to @llvm.assume
authorHal Finkel <hfinkel@anl.gov>
Mon, 3 Nov 2014 20:21:32 +0000 (20:21 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 3 Nov 2014 20:21:32 +0000 (20:21 +0000)
commit1e16fa302e2c3f68ea8187e8b782397e0b24cd0f
tree9823bb9f7600846f641e9961cd0b8759e7d8e789
parent1ae35b902ba0482ef80fa3f778efd719c9626b41
EarlyCSE should ignore calls to @llvm.assume

EarlyCSE uses a simple generation scheme for handling memory-based
dependencies, and calls to @llvm.assume (which are marked as writing to memory
to ensure the preservation of control dependencies) disturb that scheme
unnecessarily. Skipping calls to @llvm.assume is legal, and the alternative
(adding AA calls in EarlyCSE) is likely undesirable (we have GVN for that).

Fixes PR21448.

llvm-svn: 221175
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/basic.ll