OSDN Git Service

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)
commitf16d6b1ff19de131345d745c8c60d08b7dae055a
tree722bfd3647897f086ddde0e867ef22f4a0e218f3
parentfbd383c93c4aed6297b039f4ebfba637da436052
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221175 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/EarlyCSE.cpp
test/Transforms/EarlyCSE/basic.ll