AbortedChanges

Summary

  1. Merging r310706 and r310829: ------------------------------------------------------------------------ r310706 | arphaman | 2017-08-11 05:06:52 -0700 (Fri, 11 Aug 2017) | 11 lines [modules] Set the lexical DC for dummy tag decls that refer to hidden declarations that are made visible after the dummy is parsed and ODR verified Prior to this commit the "(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")," assertion failure was triggered during semantic analysis of the dummy tag declaration that was declared in another tag declaration because its lexical context did not point to the outer tag decl. rdar://32292196 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r310829 | arphaman | 2017-08-14 03:59:44 -0700 (Mon, 14 Aug 2017) | 5 lines Set the lexical context for dummy tag decl inside createTagFromNewDecl This is a follow-up to r310706. This change has been recommended by Bruno Cardoso Lopes and Richard Smith. ------------------------------------------------------------------------
  2. Merging r310796: ------------------------------------------------------------------------ r310796 | asb | 2017-08-13 11:49:33 -0700 (Sun, 13 Aug 2017) | 16 lines Remove RISCV from LLVM_ALL_TARGETS in CMakeLists.txt It was mistakenly added to that list in D23560 (committed in rL285712). RISCV is an experimental backend and should never have been in that list, I mistakenly interpreted LLVM_ALL_TARGETS as a list of all targets rather than targets to build by default. Unfortunately, because of this the RISCV backend has been building by default when it shouldn't be. This commet adds a description comment, which should help to avoid such mistakes in the future. See my message to llvm-dev for more information and analysis <http://lists.llvm.org/pipermail/llvm-dev/2017-August/116347.html>. Differential Revision: https://reviews.llvm.org/D36538 ------------------------------------------------------------------------
  3. Merging r310784: ------------------------------------------------------------------------ r310784 | ctopper | 2017-08-12 13:19:44 -0700 (Sat, 12 Aug 2017) | 16 lines [X86] When handling addcarry intrinsic, create the flag result with the correct type so we don't crash if we use a memory instruction Summary: Previously we were creating the flag result with MVT::Other which is interpretted as a Chain node. If we used a memory form of the instruction we would end up with a copyToReg that consumed the chain result of the adcx instruction instead of the flag result. Pretty sure we should be using MVT::i32 here, that's what we do other places we create these node types. We should probably consider this for 5.0 as well. Reviewers: RKSimon, zvi, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36645 ------------------------------------------------------------------------
  4. 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 ------------------------------------------------------------------------
Revision 310902 by hans:
Merging r310706 and r310829:
------------------------------------------------------------------------
r310706 | arphaman | 2017-08-11 05:06:52 -0700 (Fri, 11 Aug 2017) | 11 lines

[modules] Set the lexical DC for dummy tag decls that refer to hidden
declarations that are made visible after the dummy is parsed and ODR verified

Prior to this commit the
"(getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."),"
assertion failure was triggered during semantic analysis of the dummy
tag declaration that was declared in another tag declaration because its
lexical context did not point to the outer tag decl.

rdar://32292196

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

------------------------------------------------------------------------
r310829 | arphaman | 2017-08-14 03:59:44 -0700 (Mon, 14 Aug 2017) | 5 lines

Set the lexical context for dummy tag decl inside createTagFromNewDecl

This is a follow-up to r310706. This change has been recommended by
Bruno Cardoso Lopes and Richard Smith.

------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/branches/release_50clang.src
The file was modified/cfe/branches/release_50/lib/Sema/SemaDecl.cppclang.src/lib/Sema/SemaDecl.cpp
The file was added/cfe/branches/release_50/test/Modules/Inputs/innerstructredef.hclang.src/test/Modules/Inputs/innerstructredef.h
The file was modified/cfe/branches/release_50/test/Modules/Inputs/module.mapclang.src/test/Modules/Inputs/module.map
The file was added/cfe/branches/release_50/test/Modules/inner-struct-redefines-invisible.mclang.src/test/Modules/inner-struct-redefines-invisible.m
Revision 310900 by hans:
Merging r310796:
------------------------------------------------------------------------
r310796 | asb | 2017-08-13 11:49:33 -0700 (Sun, 13 Aug 2017) | 16 lines

Remove RISCV from LLVM_ALL_TARGETS in CMakeLists.txt

It was mistakenly added to that list in D23560 (committed in rL285712). RISCV
is an experimental backend and should never have been in that list, I
mistakenly interpreted LLVM_ALL_TARGETS as a list of all targets rather than
targets to build by default. Unfortunately, because of this the RISCV backend
has been building by default when it shouldn't be.

This commet adds a description comment, which should help to avoid such
mistakes in the future.

See my message to llvm-dev for more information and analysis
<http://lists.llvm.org/pipermail/llvm-dev/2017-August/116347.html>.

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

------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/CMakeLists.txtllvm.src/CMakeLists.txt
Revision 310899 by hans:
Merging r310784:
------------------------------------------------------------------------
r310784 | ctopper | 2017-08-12 13:19:44 -0700 (Sat, 12 Aug 2017) | 16 lines

[X86] When handling addcarry intrinsic, create the flag result with the correct type so we don't crash if we use a memory instruction

Summary:
Previously we were creating the flag result with MVT::Other which is interpretted as a Chain node. If we used a memory form of the instruction we would end up with a copyToReg that consumed the chain result of the adcx instruction instead of the flag result.

Pretty sure we should be using MVT::i32 here, that's what we do other places we create these node types.

We should probably consider this for 5.0 as well.

Reviewers: RKSimon, zvi, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36645
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Target/X86/X86ISelLowering.cppllvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/branches/release_50/test/CodeGen/X86/adx-intrinsics.llllvm.src/test/CodeGen/X86/adx-intrinsics.ll
Revision 310898 by hans:
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


------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Transforms/Scalar/BDCE.cppllvm.src/lib/Transforms/Scalar/BDCE.cpp
The file was added/llvm/branches/release_50/test/Transforms/BDCE/invalidate-assumptions.llllvm.src/test/Transforms/BDCE/invalidate-assumptions.ll