]> granicus.if.org Git - llvm/commit
Merging r309945, r310779 and r310842:
authorHans Wennborg <hans@hanshq.net>
Tue, 15 Aug 2017 00:06:23 +0000 (00:06 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 15 Aug 2017 00:06:23 +0000 (00:06 +0000)
commit492b2bcbcfa72793b2084d970ddc382f52131d49
treea1c9d396efce0a7ecd487ffe47ef75d6f03a8f8d
parent4e549e75cefc7646f02e6307b9d0cad37913187b
Merging r309945, r310779 and r310842:
------------------------------------------------------------------------
r309945 | spatel | 2017-08-03 08:07:37 -0700 (Thu, 03 Aug 2017) | 2 lines

[BDCE] add tests to show invalid/incomplete transforms

------------------------------------------------------------------------

------------------------------------------------------------------------
r310779 | spatel | 2017-08-12 09:41:08 -0700 (Sat, 12 Aug 2017) | 13 lines

[BDCE] clear poison generators after turning a value into zero (PR33695, PR34037)

nsw, nuw, and exact carry implicit assumptions about their operands, so we need
to clear those after trivializing a value. We decided there was no danger for
llvm.assume or metadata, so there's just a comment about that.

This fixes miscompiles as shown in:
https://bugs.llvm.org/show_bug.cgi?id=33695
https://bugs.llvm.org/show_bug.cgi?id=34037

Differential Revision: https://reviews.llvm.org/D36592

------------------------------------------------------------------------

------------------------------------------------------------------------
r310842 | spatel | 2017-08-14 08:13:46 -0700 (Mon, 14 Aug 2017) | 16 lines

[BDCE] reduce scope of an assert (PR34179)

The assert was added with r310779 and is usually correct,
but as the test shows, not always. The 'volatile' on the
load is needed to expose the faulty path because without
it, DemandedBits would return that the load is just dead
rather than not demanded, and so we wouldn't hit the
bogus assert.

Also, since the lambda is just a single-line now, get rid
of it and inline the DB.isAllOnesValue() calls.

This should fix (prevent execution of a faulty assert):
https://bugs.llvm.org/show_bug.cgi?id=34179

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@310898 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/BDCE.cpp
test/Transforms/BDCE/invalidate-assumptions.ll [new file with mode: 0644]