[llvm-branch-commits] [lld] r323327 - Merging r323221:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 06:53:42 2018
New Revision: 323327

URL: http://llvm.org/viewvc/llvm-project?rev=323327&view=rev
Log:
Merging r323221:

r323221 | rafael | 2018-01-23 17:59:20 +0100 (Tue, 23 Jan 2018) | 3 lines

Don't mark a shared library as needed because of a lazy symbol.

Fixes PR36029.


Added:
lld/branches/release_60/test/ELF/Inputs/as-needed-lazy.s
  - copied unchanged from r323221, 
lld/trunk/test/ELF/Inputs/as-needed-lazy.s
lld/branches/release_60/test/ELF/as-needed-lazy.s
  - copied unchanged from r323221, lld/trunk/test/ELF/as-needed-lazy.s
Modified:
lld/branches/release_60/   (props changed)
lld/branches/release_60/ELF/SymbolTable.cpp

Propchange: lld/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 06:53:42 2018
@@ -1 +1 @@
-/lld/trunk:321983,321986,322041,322259,322264
+/lld/trunk:321983,321986,322041,322259,322264,323221

Modified: lld/branches/release_60/ELF/SymbolTable.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lld/branches/release_60/ELF/SymbolTable.cpp?rev=323327&r1=323326&r2=323327&view=diff
==
--- lld/branches/release_60/ELF/SymbolTable.cpp (original)
+++ lld/branches/release_60/ELF/SymbolTable.cpp Wed Jan 24 06:53:42 2018
@@ -491,12 +491,13 @@ void SymbolTable::addShared(StringRef Na
   if (WasInserted || ((S->isUndefined() || S->isLazy()) &&
   S->getVisibility() == STV_DEFAULT)) {
 uint8_t Binding = S->Binding;
+bool WasUndefined = S->isUndefined();
 replaceSymbol(S, File, Name, Sym.getBinding(), Sym.st_other,
 Sym.getType(), Sym.st_value, Sym.st_size,
 Alignment, VerdefIndex);
 if (!WasInserted) {
   S->Binding = Binding;
-  if (!S->isWeak() && !Config->GcSections)
+  if (!S->isWeak() && !Config->GcSections && WasUndefined)
 File.IsNeeded = true;
 }
   }


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r323132 - [6.0.0 Release] Release notes for configuration files in clang

2018-01-24 Thread Serge Pavlov via llvm-branch-commits
Author: sepavloff
Date: Mon Jan 22 08:44:29 2018
New Revision: 323132

URL: http://llvm.org/viewvc/llvm-project?rev=323132&view=rev
Log:
[6.0.0 Release] Release notes for configuration files in clang

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

Modified:
cfe/branches/release_60/docs/ReleaseNotes.rst

Modified: cfe/branches/release_60/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/docs/ReleaseNotes.rst?rev=323132&r1=323131&r2=323132&view=diff
==
--- cfe/branches/release_60/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_60/docs/ReleaseNotes.rst Mon Jan 22 08:44:29 2018
@@ -163,6 +163,15 @@ Attribute Changes in Clang
 - The presence of __attribute__((availability(...))) on a declaration no longer
   implies default visibility for that declaration on macOS.
 
+- Clang now supports configuration files. These are collections of driver
+  options, which can be applied by specifying the configuration file, either
+  using command line option `--config foo.cfg` or encoding it into executable
+  name `foo-clang`. Clang behaves as if the options from this file were 
inserted
+  before the options specified in command line. This feature is primary 
intended
+  to facilitate cross compilation. Details can be found in
+  `Clang Compiler User's Manual
+  `.
+
 - ...
 
 Windows Support


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r323179 - [ReleaseNotes] Mention OpenMP Tools Interface in runtime library

2018-01-24 Thread Jonas Hahnfeld via llvm-branch-commits
Author: hahnfeld
Date: Mon Jan 22 23:50:11 2018
New Revision: 323179

URL: http://llvm.org/viewvc/llvm-project?rev=323179&view=rev
Log:
[ReleaseNotes] Mention OpenMP Tools Interface in runtime library

The OpenMP runtime has no dedicated Release Notes, so add it to Clang's
section about OpenMP.

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


Modified:
cfe/branches/release_60/docs/ReleaseNotes.rst

Modified: cfe/branches/release_60/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/docs/ReleaseNotes.rst?rev=323179&r1=323178&r2=323179&view=diff
==
--- cfe/branches/release_60/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_60/docs/ReleaseNotes.rst Mon Jan 22 23:50:11 2018
@@ -231,6 +231,13 @@ OpenMP Support in Clang
 - Added support for `reduction`-based clauses on `task`-based directives from
   upcoming OpenMP 5.0.
 
+- The LLVM OpenMP runtime `libomp` now supports the OpenMP Tools Interface 
(OMPT)
+  on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS. If you 
observe
+  a measurable performance impact on one of your applications without a tool
+  attached, please rebuild the runtime library with 
`-DLIBOMP_OMPT_SUPPORT=OFF` and
+  file a bug at `LLVM's Bugzilla `_ or send a message 
to the
+  `OpenMP development list 
`_.
+
 Internal API Changes
 
 


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r323128 - Merging r323123:

2018-01-24 Thread Jonas Hahnfeld via llvm-branch-commits
Author: hahnfeld
Date: Mon Jan 22 07:38:26 2018
New Revision: 323128

URL: http://llvm.org/viewvc/llvm-project?rev=323128&view=rev
Log:
Merging r323123:

r323123 | hahnfeld | 2018-01-22 16:27:45 +0100 (Mon, 22 Jan 2018) | 6 lines

[DOCS] Mention OpenMP Tools Interface in runtime library

Also list supported configurations (architectures + operating
systems).

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


Modified:
cfe/branches/release_60/   (props changed)
cfe/branches/release_60/docs/OpenMPSupport.rst

Propchange: cfe/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 22 07:38:26 2018
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:321754,321771,321777,321779,321933,322018,322236,322246,322350,322390,322405,322420,322518,322593,322813,322901,322904,322984
+/cfe/trunk:321754,321771,321777,321779,321933,322018,322236,322246,322350,322390,322405,322420,322518,322593,322813,322901,322904,322984,323123
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_60/docs/OpenMPSupport.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/docs/OpenMPSupport.rst?rev=323128&r1=323127&r2=323128&view=diff
==
--- cfe/branches/release_60/docs/OpenMPSupport.rst (original)
+++ cfe/branches/release_60/docs/OpenMPSupport.rst Mon Jan 22 07:38:26 2018
@@ -65,4 +65,4 @@ Combined directives
 * #pragma omp target teams distribute parallel for [simd]: :partial:`Partial`. 
 No full codegen support.
 
 Clang does not support any constructs/updates from upcoming OpenMP 5.0 except 
for `reduction`-based clauses in the `task` and `target`-based directives.
-
+In addition, the LLVM OpenMP runtime `libomp` supports the OpenMP Tools 
Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and mac 
OS.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r323066 - [docs] Fix typo in Release Notes

2018-01-24 Thread Jonas Hahnfeld via llvm-branch-commits
Author: hahnfeld
Date: Sun Jan 21 03:43:32 2018
New Revision: 323066

URL: http://llvm.org/viewvc/llvm-project?rev=323066&view=rev
Log:
[docs] Fix typo in Release Notes

Modified:
cfe/branches/release_60/docs/ReleaseNotes.rst

Modified: cfe/branches/release_60/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/docs/ReleaseNotes.rst?rev=323066&r1=323065&r2=323066&view=diff
==
--- cfe/branches/release_60/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_60/docs/ReleaseNotes.rst Sun Jan 21 03:43:32 2018
@@ -209,7 +209,7 @@ OpenCL C Language Changes in Clang
 OpenMP Support in Clang
 --
 
-- Added options `-f[no]-openmp-simd` that support code emission only foe OpenMP
+- Added options `-f[no]-openmp-simd` that support code emission only for OpenMP
   SIMD-based directives, like `#pragma omp simd`, `#pragma omp parallel for 
simd`
   etc. The code is emitted only for simd-based part of the combined directives
   and clauses.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r323332 - ReleaseNotes: mention improved codeview quality

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:24:14 2018
New Revision: 323332

URL: http://llvm.org/viewvc/llvm-project?rev=323332&view=rev
Log:
ReleaseNotes: mention improved codeview quality

Modified:
llvm/branches/release_60/docs/ReleaseNotes.rst

Modified: llvm/branches/release_60/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/docs/ReleaseNotes.rst?rev=323332&r1=323331&r2=323332&view=diff
==
--- llvm/branches/release_60/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_60/docs/ReleaseNotes.rst Wed Jan 24 07:24:14 2018
@@ -54,6 +54,8 @@ Non-comprehensive list of changes in thi
   ``DIVariables`` to the instructions in a ``Module``. The ``CheckDebugify``
   pass determines how much of the metadata is lost.
 
+* Significantly improved quality of CodeView debug info for Windows.
+
 * Note..
 
 .. NOTE


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r323333 - Merging r323008:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:28:43 2018
New Revision: 32

URL: http://llvm.org/viewvc/llvm-project?rev=32&view=rev
Log:
Merging r323008:

r323008 | vsapsai | 2018-01-20 00:41:47 +0100 (Sat, 20 Jan 2018) | 32 lines

[Lex] Fix crash on code completion in comment in included file.

This fixes PR32732 by updating CurLexerKind to reflect available lexers.
We were hitting null pointer in Preprocessor::Lex because CurLexerKind
was CLK_Lexer but CurLexer was null. And we set it to null in
Preprocessor::HandleEndOfFile when exiting a file with code completion
point.

To reproduce the crash it is important for a comment to be inside a
class specifier. In this case in Parser::ParseClassSpecifier we improve
error recovery by pushing a semicolon token back into the preprocessor
and later on try to lex a token because we haven't reached the end of
file.

Also clang crashes only on code completion in included file, i.e. when
IncludeMacroStack is not empty. Though we reset CurLexer even if include
stack is empty. The difference is that during pushing back a semicolon
token, preprocessor calls EnterCachingLexMode which decides it is
already in caching mode because various lexers are null and
IncludeMacroStack is not empty. As the result, CurLexerKind remains
CLK_Lexer instead of updating to CLK_CachingLexer.

rdar://problem/34787685

Reviewers: akyrtzi, doug.gregor, arphaman

Reviewed By: arphaman

Subscribers: cfe-commits, kfunk, arphaman, nemanjai, kbarton

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



Added:
cfe/branches/release_60/test/CodeCompletion/Inputs/comments.h
  - copied unchanged from r323008, 
cfe/trunk/test/CodeCompletion/Inputs/comments.h
cfe/branches/release_60/test/CodeCompletion/comments.cpp
  - copied unchanged from r323008, 
cfe/trunk/test/CodeCompletion/comments.cpp
Modified:
cfe/branches/release_60/   (props changed)
cfe/branches/release_60/lib/Lex/PPCaching.cpp
cfe/branches/release_60/lib/Lex/PPLexerChange.cpp

Propchange: cfe/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:28:43 2018
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:321754,321771,321777,321779,321933,322018,322236,322246,322350,322390,322405,322420,322518,322593,322813,322901,322904,322984,323123
+/cfe/trunk:321754,321771,321777,321779,321933,322018,322236,322246,322350,322390,322405,322420,322518,322593,322813,322901,322904,322984,323008,323123
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_60/lib/Lex/PPCaching.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/lib/Lex/PPCaching.cpp?rev=32&r1=323332&r2=32&view=diff
==
--- cfe/branches/release_60/lib/Lex/PPCaching.cpp (original)
+++ cfe/branches/release_60/lib/Lex/PPCaching.cpp Wed Jan 24 07:28:43 2018
@@ -105,8 +105,10 @@ void Preprocessor::CachingLex(Token &Res
 }
 
 void Preprocessor::EnterCachingLexMode() {
-  if (InCachingLexMode())
+  if (InCachingLexMode()) {
+assert(CurLexerKind == CLK_CachingLexer && "Unexpected lexer kind");
 return;
+  }
 
   PushIncludeMacroStack();
   CurLexerKind = CLK_CachingLexer;

Modified: cfe/branches/release_60/lib/Lex/PPLexerChange.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/lib/Lex/PPLexerChange.cpp?rev=32&r1=323332&r2=32&view=diff
==
--- cfe/branches/release_60/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/branches/release_60/lib/Lex/PPLexerChange.cpp Wed Jan 24 07:28:43 2018
@@ -444,6 +444,7 @@ bool Preprocessor::HandleEndOfFile(Token
   }
 
   CurPPLexer = nullptr;
+  recomputeCurLexerKind();
   return true;
 }
 


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r323334 - Merging r322372 and r322767:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:33:33 2018
New Revision: 323334

URL: http://llvm.org/viewvc/llvm-project?rev=323334&view=rev
Log:
Merging r322372 and r322767:


r322372 | nemanjai | 2018-01-12 15:58:41 +0100 (Fri, 12 Jan 2018) | 10 lines

[PowerPC] Zero-extend the compare operand for ATOMIC_CMP_SWAP

Part of the fix for https://bugs.llvm.org/show_bug.cgi?id=35812.
This patch ensures that the compare operand for the atomic compare and swap
is properly zero-extended to 32 bits if applicable.
A follow-up commit will fix the extension for the SETCC node generated when
expanding an ATOMIC_CMP_SWAP_WITH_SUCCESS. That will complete the bug fix.

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




r322767 | efriedma | 2018-01-17 23:04:36 +0100 (Wed, 17 Jan 2018) | 12 lines

[LegalizeDAG] Fix ATOMIC_CMP_SWAP_WITH_SUCCESS legalization.

The code wasn't zero-extending correctly, so the comparison could
spuriously fail.

Adds some AArch64 tests to cover this case.

Inspired by D41791.

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




Added:
llvm/branches/release_60/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
  - copied, changed from r322372, 
llvm/trunk/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
Modified:
llvm/branches/release_60/   (props changed)
llvm/branches/release_60/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.h
llvm/branches/release_60/lib/Target/PowerPC/PPCInstrInfo.td
llvm/branches/release_60/test/CodeGen/AArch64/atomic-ops-lse.ll
llvm/branches/release_60/test/CodeGen/ARM/atomic-cmpxchg.ll
llvm/branches/release_60/test/CodeGen/ARM/cmpxchg-O0.ll
llvm/branches/release_60/test/CodeGen/PowerPC/atomics-regression.ll

Propchange: llvm/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:33:33 2018
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322473,322623,322644,322724,322875,322878-322879,322904-322905,322973,322993,323034
+/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322904-322905,322973,322993,323034

Modified: llvm/branches/release_60/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=323334&r1=32&r2=323334&view=diff
==
--- llvm/branches/release_60/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/branches/release_60/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jan 
24 07:33:33 2018
@@ -2965,12 +2965,12 @@ bool SelectionDAGLegalize::ExpandNode(SD
 case ISD::ZERO_EXTEND:
   LHS = DAG.getNode(ISD::AssertZext, dl, OuterType, Res,
 DAG.getValueType(AtomicType));
-  RHS = DAG.getNode(ISD::ZERO_EXTEND, dl, OuterType, Node->getOperand(2));
+  RHS = DAG.getZeroExtendInReg(Node->getOperand(2), dl, AtomicType);
   ExtRes = LHS;
   break;
 case ISD::ANY_EXTEND:
   LHS = DAG.getZeroExtendInReg(Res, dl, AtomicType);
-  RHS = DAG.getNode(ISD::ZERO_EXTEND, dl, OuterType, Node->getOperand(2));
+  RHS = DAG.getZeroExtendInReg(Node->getOperand(2), dl, AtomicType);
   break;
 default:
   llvm_unreachable("Invalid atomic op extension");

Modified: llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.cpp?rev=323334&r1=32&r2=323334&view=diff
==
--- llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/branches/release_60/lib/Target/PowerPC/PPCISelLowering.cpp Wed Jan 24 
07:33:33 2018
@@ -142,6 +142,9 @@ PPCTargetLowering::PPCTargetLowering(con
   setOperationAction(ISD::BITREVERSE, MVT::i32, Legal);
   setOperationAction(ISD::BITREVERSE, MVT::i64, Legal);
 
+  // Sub-word ATOMIC_CMP_SWAP need to ensure that the input is zero-extended.
+  setOperationAction(ISD::ATOMIC_CMP_SWAP, MVT::i32, Custom);
+
   // PowerPC has an i16 but no i8 (or i1) SEXTLOAD.
   for (MVT VT : MVT::integer_value

[llvm-branch-commits] [llvm-branch] r323335 - Merging r323190:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:38:38 2018
New Revision: 323335

URL: http://llvm.org/viewvc/llvm-project?rev=323335&view=rev
Log:
Merging r323190:

r323190 | rksimon | 2018-01-23 12:39:06 +0100 (Tue, 23 Jan 2018) | 5 lines

[X86][SSE] LowerBUILD_VECTORAsVariablePermute - fix PSHUFB source/index operand 
ordering

As detailed in rL317463, PSHUFB (like most variable shuffle instructions) uses 
Op[0] for the source vector and Op[1] for the shuffle index vector, VPERMV 
works in reverse which is probably where the confusion comes from.

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


Modified:
llvm/branches/release_60/   (props changed)
llvm/branches/release_60/lib/Target/X86/X86ISelLowering.cpp
llvm/branches/release_60/test/CodeGen/X86/var-permute-128.ll

Propchange: llvm/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:38:38 2018
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322904-322905,322973,322993,323034
+/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322904-322905,322973,322993,323034,323190

Modified: llvm/branches/release_60/lib/Target/X86/X86ISelLowering.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/Target/X86/X86ISelLowering.cpp?rev=323335&r1=323334&r2=323335&view=diff
==
--- llvm/branches/release_60/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/release_60/lib/Target/X86/X86ISelLowering.cpp Wed Jan 24 
07:38:38 2018
@@ -7898,8 +7898,9 @@ LowerBUILD_VECTORAsVariablePermute(SDVal
 DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(SrcVec), VT, DAG.getUNDEF(VT),
 SrcVec, DAG.getIntPtrConstant(0, SDLoc(SrcVec)));
   }
-  return DAG.getNode(VT == MVT::v16i8 ? X86ISD::PSHUFB : X86ISD::VPERMV,
- SDLoc(V), VT, IndicesVec, SrcVec);
+  if (VT == MVT::v16i8)
+return DAG.getNode(X86ISD::PSHUFB, SDLoc(V), VT, SrcVec, IndicesVec);
+  return DAG.getNode(X86ISD::VPERMV, SDLoc(V), VT, IndicesVec, SrcVec);
 }
 
 SDValue

Modified: llvm/branches/release_60/test/CodeGen/X86/var-permute-128.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/CodeGen/X86/var-permute-128.ll?rev=323335&r1=323334&r2=323335&view=diff
==
--- llvm/branches/release_60/test/CodeGen/X86/var-permute-128.ll (original)
+++ llvm/branches/release_60/test/CodeGen/X86/var-permute-128.ll Wed Jan 24 
07:38:38 2018
@@ -207,13 +207,12 @@ define <8 x i16> @var_shuffle_v8i16(<8 x
 define <16 x i8> @var_shuffle_v16i8(<16 x i8> %v, <16 x i8> %indices) nounwind 
{
 ; SSSE3-LABEL: var_shuffle_v16i8:
 ; SSSE3:   # %bb.0:
-; SSSE3-NEXT:pshufb %xmm0, %xmm1
-; SSSE3-NEXT:movdqa %xmm1, %xmm0
+; SSSE3-NEXT:pshufb %xmm1, %xmm0
 ; SSSE3-NEXT:retq
 ;
 ; AVX-LABEL: var_shuffle_v16i8:
 ; AVX:   # %bb.0:
-; AVX-NEXT:vpshufb %xmm0, %xmm1, %xmm0
+; AVX-NEXT:vpshufb %xmm1, %xmm0, %xmm0
 ; AVX-NEXT:retq
   %index0 = extractelement <16 x i8> %indices, i32 0
   %index1 = extractelement <16 x i8> %indices, i32 1


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] r323336 - Merging r322359, r322421, and r322801:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:48:26 2018
New Revision: 323336

URL: http://llvm.org/viewvc/llvm-project?rev=323336&view=rev
Log:
Merging r322359, r322421, and r322801:


r322359 | grimar | 2018-01-12 10:07:35 +0100 (Fri, 12 Jan 2018) | 8 lines

[ELF] - Fix for ld.lld does not accept "AT" syntax for declaring LMA region

AT> lma_region expression allows to specify the memory region
for section load address.

Should fix PR35684.

Differential revision: https://reviews.llvm.org/D41397



r322421 | rafael | 2018-01-13 00:26:25 +0100 (Sat, 13 Jan 2018) | 9 lines

Fix incorrect physical address on self-referencing AT command.

When a section placement (AT) command references the section itself,
the physical address of the section in the ELF header was calculated
incorrectly due to alignment happening right after the location
pointer's value was captured.

The problem was diagnosed and the first version of the patch written
by Erick Reyes.



r322801 | rafael | 2018-01-18 02:14:57 +0100 (Thu, 18 Jan 2018) | 5 lines

Handle parsing AT(ADDR(.foo-bar)).

The problem we had with it is that anything inside an AT is an
expression, so we failed to parse the section name because of the - in
it.


Added:
lld/branches/release_60/test/ELF/linkerscript/at-self-reference.s
  - copied unchanged from r322421, 
lld/trunk/test/ELF/linkerscript/at-self-reference.s
lld/branches/release_60/test/ELF/linkerscript/at2.s
  - copied unchanged from r322359, lld/trunk/test/ELF/linkerscript/at2.s
lld/branches/release_60/test/ELF/linkerscript/parse-section-in-addr.s
  - copied unchanged from r322801, 
lld/trunk/test/ELF/linkerscript/parse-section-in-addr.s
Modified:
lld/branches/release_60/   (props changed)
lld/branches/release_60/ELF/LinkerScript.cpp
lld/branches/release_60/ELF/OutputSections.h
lld/branches/release_60/ELF/ScriptParser.cpp

Propchange: lld/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:48:26 2018
@@ -1 +1 @@
-/lld/trunk:321983,321986,322041,322259,322264,323221
+/lld/trunk:321983,321986,322041,322259,322264,322359,322421,322801,323221

Modified: lld/branches/release_60/ELF/LinkerScript.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lld/branches/release_60/ELF/LinkerScript.cpp?rev=323336&r1=323335&r2=323336&view=diff
==
--- lld/branches/release_60/ELF/LinkerScript.cpp (original)
+++ lld/branches/release_60/ELF/LinkerScript.cpp Wed Jan 24 07:48:26 2018
@@ -608,13 +608,6 @@ void LinkerScript::switchTo(OutputSectio
 
   Ctx->OutSec = Sec;
   Ctx->OutSec->Addr = advance(0, Ctx->OutSec->Alignment);
-
-  // If neither AT nor AT> is specified for an allocatable section, the linker
-  // will set the LMA such that the difference between VMA and LMA for the
-  // section is the same as the preceding output section in the same region
-  // https://sourceware.org/binutils/docs-2.20/ld/Output-Section-LMA.html
-  if (Ctx->LMAOffset)
-Ctx->OutSec->LMAOffset = Ctx->LMAOffset();
 }
 
 // This function searches for a memory region to place the given output
@@ -662,12 +655,28 @@ void LinkerScript::assignOffsets(OutputS
   if (Ctx->MemRegion)
 Dot = Ctx->MemRegionOffset[Ctx->MemRegion];
 
+  switchTo(Sec);
+
   if (Sec->LMAExpr) {
 uint64_t D = Dot;
 Ctx->LMAOffset = [=] { return Sec->LMAExpr().getValue() - D; };
   }
 
-  switchTo(Sec);
+  if (!Sec->LMARegionName.empty()) {
+if (MemoryRegion *MR = MemoryRegions.lookup(Sec->LMARegionName)) {
+  uint64_t Offset = MR->Origin - Dot;
+  Ctx->LMAOffset = [=] { return Offset; };
+} else {
+  error("memory region '" + Sec->LMARegionName + "' not declared");
+}
+  }
+
+  // If neither AT nor AT> is specified for an allocatable section, the linker
+  // will set the LMA such that the difference between VMA and LMA for the
+  // section is the same as the preceding output section in the same region
+  // https://sourceware.org/binutils/docs-2.20/ld/Output-Section-LMA.html
+  if (Ctx->LMAOffset)
+Ctx->OutSec->LMAOffset = Ctx->LMAOffset();
 
   // The Size previously denoted how many InputSections had been added to this
   // section, and was used for sorting SHF_LINK_ORDER sections. Reset it to

Modified: lld/branches/release_60/ELF/OutputSections.h
URL: 
http://llvm.org/viewvc/llvm-project/lld/branches/release_60/ELF/OutputSections.h?rev=323336&r1=323335&r2=323336&view=diff
===

[llvm-branch-commits] [llvm-branch] r323337 - Merging r322900 and r323307:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:53:46 2018
New Revision: 323337

URL: http://llvm.org/viewvc/llvm-project?rev=323337&view=rev
Log:
Merging r322900 and r323307:


r322900 | mstorsjo | 2018-01-18 22:21:48 +0100 (Thu, 18 Jan 2018) | 6 lines

[test] Actually check the common parts in CodeGen/ARM/global-merge-external.ll. 
NFC.

Previously, these parts weren't ever checked. The label patterns
need to be extended to match successfully on macho.

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



r323307 | mstorsjo | 2018-01-24 07:40:04 +0100 (Wed, 24 Jan 2018) | 6 lines

[GlobalMerge] Don't merge dllexport globals

Merging such globals loses the dllexport attribute. Add a test
to check that normal globals still are merged.

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


Added:
llvm/branches/release_60/test/CodeGen/ARM/global-merge-dllexport.ll
  - copied unchanged from r323307, 
llvm/trunk/test/CodeGen/ARM/global-merge-dllexport.ll
Modified:
llvm/branches/release_60/   (props changed)
llvm/branches/release_60/lib/CodeGen/GlobalMerge.cpp
llvm/branches/release_60/test/CodeGen/ARM/global-merge-external.ll

Propchange: llvm/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:53:46 2018
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322904-322905,322973,322993,323034,323190
+/llvm/trunk:155241,321751,321789,321791,321806,321862,321870,321872,321878,321980,321991,321993-321994,322003,322053,322056,322103,322106,33,322272,322313,322372,322473,322623,322644,322724,322767,322875,322878-322879,322900,322904-322905,322973,322993,323034,323190,323307

Modified: llvm/branches/release_60/lib/CodeGen/GlobalMerge.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/CodeGen/GlobalMerge.cpp?rev=323337&r1=323336&r2=323337&view=diff
==
--- llvm/branches/release_60/lib/CodeGen/GlobalMerge.cpp (original)
+++ llvm/branches/release_60/lib/CodeGen/GlobalMerge.cpp Wed Jan 24 07:53:46 
2018
@@ -577,7 +577,8 @@ bool GlobalMerge::doInitialization(Modul
   for (auto &GV : M.globals()) {
 // Merge is safe for "normal" internal or external globals only
 if (GV.isDeclaration() || GV.isThreadLocal() ||
-GV.hasSection() || GV.hasImplicitSection())
+GV.hasSection() || GV.hasImplicitSection() ||
+GV.hasDLLExportStorageClass())
   continue;
 
 // It's not safe to merge globals that may be preempted

Modified: llvm/branches/release_60/test/CodeGen/ARM/global-merge-external.ll
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/test/CodeGen/ARM/global-merge-external.ll?rev=323337&r1=323336&r2=323337&view=diff
==
--- llvm/branches/release_60/test/CodeGen/ARM/global-merge-external.ll 
(original)
+++ llvm/branches/release_60/test/CodeGen/ARM/global-merge-external.ll Wed Jan 
24 07:53:46 2018
@@ -1,8 +1,9 @@
-; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge   
  | FileCheck %s --check-prefix=CHECK-MERGE
-; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge 
-global-merge-on-external=true  | FileCheck %s --check-prefix=CHECK-MERGE
-; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge 
-global-merge-on-external=false | FileCheck %s --check-prefix=CHECK-NO-MERGE
-; RUN: llc < %s -mtriple=arm-macho -arm-global-merge   
  | FileCheck %s --check-prefix=CHECK-NO-MERGE
-; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge -relocation-model=pic 
  | FileCheck %s --check-prefix=CHECK-NO-MERGE
+; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge   
  | FileCheck %s --check-prefixes=CHECK,CHECK-MERGE
+; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge 
-global-merge-on-external=true  | FileCheck %s 
--check-prefixes=CHECK,CHECK-MERGE
+; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge 
-global-merge-on-external=false | FileCheck %s 
--check-prefixes=CHECK,CHECK-NO-MERGE
+; RUN: llc < %s -mtriple=arm-macho -arm-global-merge   
  | FileCheck %s --check-prefixes=CHECK,CHECK-NO-MERGE
+; RUN: llc < %s -mtriple=arm-eabi  -arm-global-merge -relocation-model=pic 
  | FileCheck %s --check-prefixes=CHECK,CH

[llvm-branch-commits] [compiler-rt-branch] r323338 - Merging r323315:

2018-01-24 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Wed Jan 24 07:56:18 2018
New Revision: 323338

URL: http://llvm.org/viewvc/llvm-project?rev=323338&view=rev
Log:
Merging r323315:

r323315 | mstorsjo | 2018-01-24 11:14:52 +0100 (Wed, 24 Jan 2018) | 9 lines

[builtins] Align addresses to cache lines in __clear_cache for aarch64

This makes sure that the last cache line gets invalidated properly.

This matches the example code at
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/BABJDBHI.html,
and also matches what libgcc does.

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


Modified:
compiler-rt/branches/release_60/   (props changed)
compiler-rt/branches/release_60/lib/builtins/clear_cache.c

Propchange: compiler-rt/branches/release_60/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 24 07:56:18 2018
@@ -1 +1 @@
-/compiler-rt/trunk:323039
+/compiler-rt/trunk:323039,323315

Modified: compiler-rt/branches/release_60/lib/builtins/clear_cache.c
URL: 
http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_60/lib/builtins/clear_cache.c?rev=323338&r1=323337&r2=323338&view=diff
==
--- compiler-rt/branches/release_60/lib/builtins/clear_cache.c (original)
+++ compiler-rt/branches/release_60/lib/builtins/clear_cache.c Wed Jan 24 
07:56:18 2018
@@ -163,12 +163,14 @@ void __clear_cache(void *start, void *en
* uintptr_t in case this runs in an IPL32 environment.
*/
   const size_t dcache_line_size = 4 << ((ctr_el0 >> 16) & 15);
-  for (addr = xstart; addr < xend; addr += dcache_line_size)
+  for (addr = xstart & ~(dcache_line_size - 1); addr < xend;
+   addr += dcache_line_size)
 __asm __volatile("dc cvau, %0" :: "r"(addr));
   __asm __volatile("dsb ish");
 
   const size_t icache_line_size = 4 << ((ctr_el0 >> 0) & 15);
-  for (addr = xstart; addr < xend; addr += icache_line_size)
+  for (addr = xstart & ~(icache_line_size - 1); addr < xend;
+   addr += icache_line_size)
 __asm __volatile("ic ivau, %0" :: "r"(addr));
   __asm __volatile("isb sy");
 #elif defined (__powerpc64__)


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits