[PATCH] D46767: Force the PS4 clang ABI version to 6, and add a warning if this is attempted to be overridden

2018-05-11 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added a reviewer: probinson.

For compatibility reasons, the PS4 clang ABI must use version 6, so we force 
the compiler to use this version if the PS4 target triple is specified. We also 
emit a new warning now if a clang abi version was specified which is not 6 to 
let the user know we are ignoring their request.


Repository:
  rC Clang

https://reviews.llvm.org/D46767

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGenCXX/alignment.cpp
  test/Driver/clang-abi-compat.cpp


Index: test/Driver/clang-abi-compat.cpp
===
--- test/Driver/clang-abi-compat.cpp
+++ test/Driver/clang-abi-compat.cpp
@@ -0,0 +1,6 @@
+// PS4 target requires clang ABI version 6, check that a warning is emitted 
when a version other than 6 is requested.
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=4 %s 2>&1 | 
FileCheck %s -check-prefix=CHECK-WARNING
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=latest %s 2>&1 | 
FileCheck %s -check-prefix=CHECK-WARNING
+
+// CHECK-WARNING: warning: target requires clang ABI version 6, ignoring 
requested version
+
Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,8 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | 
FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 
-fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
+// Check that the PS4 target uses the 6.0 compat settings.
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s 
--check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 
-fclang-abi-compat=latest | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: lib/Frontend/CompilerInvocation.cpp
===
--- lib/Frontend/CompilerInvocation.cpp
+++ lib/Frontend/CompilerInvocation.cpp
@@ -2751,6 +2751,16 @@
   << A->getAsString(Args) << A->getValue();
 }
   }
+  // The PS4 requires version 6 of the clang ABI.
+  if (T.isPS4()) {
+// Issue a warning if another version of the ABI was requested.
+if (Args.getLastArg(OPT_fclang_abi_compat_EQ) &&
+Opts.getClangABICompat() != LangOptions::ClangABI::Ver6) {
+  Diags.Report(diag::warn_drv_ignored_clang_abi_version)
+<< 6;
+}
+Opts.setClangABICompat(LangOptions::ClangABI::Ver6);
+  }
 }
 
 static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
Index: include/clang/Basic/DiagnosticDriverKinds.td
===
--- include/clang/Basic/DiagnosticDriverKinds.td
+++ include/clang/Basic/DiagnosticDriverKinds.td
@@ -149,6 +149,9 @@
 def warn_drv_unknown_argument_clang_cl_with_suggestion : Warning<
   "unknown argument ignored in clang-cl '%0' (did you mean '%1'?)">,
   InGroup;
+def warn_drv_ignored_clang_abi_version : Warning<
+  "target requires clang ABI version %0, ignoring requested version">,
+  InGroup;
 
 def warn_drv_ycyu_no_arg_clang_cl : Warning<
   "support for '%0' without a filename not implemented yet; flag ignored">,


Index: test/Driver/clang-abi-compat.cpp
===
--- test/Driver/clang-abi-compat.cpp
+++ test/Driver/clang-abi-compat.cpp
@@ -0,0 +1,6 @@
+// PS4 target requires clang ABI version 6, check that a warning is emitted when a version other than 6 is requested.
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=4 %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=latest %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
+
+// CHECK-WARNING: warning: target requires clang ABI version 6, ignoring requested version
+
Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,8 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 -fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// Check that the PS4 target uses the 6.0 compat settings.
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 -fclang-abi-compat=latest | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V

[PATCH] D46767: Force the PS4 clang ABI version to 6, and add a warning if this is attempted to be overridden

2018-05-11 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rC332160: Force the PS4 clang ABI version to 6. (authored by 
dyung, committed by ).

Repository:
  rC Clang

https://reviews.llvm.org/D46767

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGenCXX/alignment.cpp
  test/Driver/clang-abi-compat.cpp


Index: include/clang/Basic/DiagnosticDriverKinds.td
===
--- include/clang/Basic/DiagnosticDriverKinds.td
+++ include/clang/Basic/DiagnosticDriverKinds.td
@@ -150,6 +150,9 @@
 def warn_drv_unknown_argument_clang_cl_with_suggestion : Warning<
   "unknown argument ignored in clang-cl '%0' (did you mean '%1'?)">,
   InGroup;
+def warn_drv_ignored_clang_abi_version : Warning<
+  "target requires clang ABI version %0, ignoring requested version">,
+  InGroup;
 
 def warn_drv_ycyu_no_arg_clang_cl : Warning<
   "support for '%0' without a filename not implemented yet; flag ignored">,
Index: test/Driver/clang-abi-compat.cpp
===
--- test/Driver/clang-abi-compat.cpp
+++ test/Driver/clang-abi-compat.cpp
@@ -0,0 +1,6 @@
+// PS4 target requires clang ABI version 6, check that a warning is emitted 
when a version other than 6 is requested.
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=4 %s 2>&1 | 
FileCheck %s -check-prefix=CHECK-WARNING
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=latest %s 2>&1 | 
FileCheck %s -check-prefix=CHECK-WARNING
+
+// CHECK-WARNING: warning: target requires clang ABI version 6, ignoring 
requested version
+
Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,8 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | 
FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 
-fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
+// Check that the PS4 target uses the 6.0 compat settings.
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s 
--check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 
-fclang-abi-compat=latest | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: lib/Frontend/CompilerInvocation.cpp
===
--- lib/Frontend/CompilerInvocation.cpp
+++ lib/Frontend/CompilerInvocation.cpp
@@ -2751,6 +2751,16 @@
   << A->getAsString(Args) << A->getValue();
 }
   }
+  // The PS4 requires version 6 of the clang ABI.
+  if (T.isPS4()) {
+// Issue a warning if another version of the ABI was requested.
+if (Args.getLastArg(OPT_fclang_abi_compat_EQ) &&
+Opts.getClangABICompat() != LangOptions::ClangABI::Ver6) {
+  Diags.Report(diag::warn_drv_ignored_clang_abi_version)
+<< 6;
+}
+Opts.setClangABICompat(LangOptions::ClangABI::Ver6);
+  }
 }
 
 static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {


Index: include/clang/Basic/DiagnosticDriverKinds.td
===
--- include/clang/Basic/DiagnosticDriverKinds.td
+++ include/clang/Basic/DiagnosticDriverKinds.td
@@ -150,6 +150,9 @@
 def warn_drv_unknown_argument_clang_cl_with_suggestion : Warning<
   "unknown argument ignored in clang-cl '%0' (did you mean '%1'?)">,
   InGroup;
+def warn_drv_ignored_clang_abi_version : Warning<
+  "target requires clang ABI version %0, ignoring requested version">,
+  InGroup;
 
 def warn_drv_ycyu_no_arg_clang_cl : Warning<
   "support for '%0' without a filename not implemented yet; flag ignored">,
Index: test/Driver/clang-abi-compat.cpp
===
--- test/Driver/clang-abi-compat.cpp
+++ test/Driver/clang-abi-compat.cpp
@@ -0,0 +1,6 @@
+// PS4 target requires clang ABI version 6, check that a warning is emitted when a version other than 6 is requested.
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=4 %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
+// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=latest %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
+
+// CHECK-WARNING: warning: target requires clang ABI version 6, ignoring requested version
+
Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,8 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -

[PATCH] D47084: Maintain PS4 ABI compatibility

2018-05-18 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added a reviewer: probinson.

In r331136, a change was made to the compiler to fix a problem with how clang 
applied the packed attribute to classes. This is an ABI breaking change for the 
PS4 target, so this change maintains the broken behavior for the PS4 target.


Repository:
  rC Clang

https://reviews.llvm.org/D47084

Files:
  lib/AST/RecordLayoutBuilder.cpp
  test/CodeGenCXX/alignment.cpp


Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | 
FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 
-fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s 
--check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: lib/AST/RecordLayoutBuilder.cpp
===
--- lib/AST/RecordLayoutBuilder.cpp
+++ lib/AST/RecordLayoutBuilder.cpp
@@ -1178,10 +1178,12 @@
   // Clang <= 6 incorrectly applied the 'packed' attribute to base classes.
   // Per GCC's documentation, it only applies to non-static data members.
   CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment();
-  CharUnits BaseAlign = (Packed && Context.getLangOpts().getClangABICompat() <=
-   LangOptions::ClangABI::Ver6)
-? CharUnits::One()
-: UnpackedBaseAlign;
+  CharUnits BaseAlign =
+  (Packed && ((Context.getLangOpts().getClangABICompat() <=
+   LangOptions::ClangABI::Ver6) ||
+  Context.getTargetInfo().getTriple().isPS4()))
+  ? CharUnits::One()
+  : UnpackedBaseAlign;
 
   // If we have an empty base class, try to place it at offset 0.
   if (Base->Class->isEmpty() &&


Index: test/CodeGenCXX/alignment.cpp
===
--- test/CodeGenCXX/alignment.cpp
+++ test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 -fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: lib/AST/RecordLayoutBuilder.cpp
===
--- lib/AST/RecordLayoutBuilder.cpp
+++ lib/AST/RecordLayoutBuilder.cpp
@@ -1178,10 +1178,12 @@
   // Clang <= 6 incorrectly applied the 'packed' attribute to base classes.
   // Per GCC's documentation, it only applies to non-static data members.
   CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment();
-  CharUnits BaseAlign = (Packed && Context.getLangOpts().getClangABICompat() <=
-   LangOptions::ClangABI::Ver6)
-? CharUnits::One()
-: UnpackedBaseAlign;
+  CharUnits BaseAlign =
+  (Packed && ((Context.getLangOpts().getClangABICompat() <=
+   LangOptions::ClangABI::Ver6) ||
+  Context.getTargetInfo().getTriple().isPS4()))
+  ? CharUnits::One()
+  : UnpackedBaseAlign;
 
   // If we have an empty base class, try to place it at offset 0.
   if (Base->Class->isEmpty() &&
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D47084: Maintain PS4 ABI compatibility

2018-05-18 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL332773: Maintain PS4 ABI compatibility by making the fix 
made in r331136 not apply when… (authored by dyung, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D47084?vs=147571&id=147596#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47084

Files:
  cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
  cfe/trunk/test/CodeGenCXX/alignment.cpp


Index: cfe/trunk/test/CodeGenCXX/alignment.cpp
===
--- cfe/trunk/test/CodeGenCXX/alignment.cpp
+++ cfe/trunk/test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | 
FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 
-fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK 
--check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s 
--check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
===
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
@@ -1178,10 +1178,12 @@
   // Clang <= 6 incorrectly applied the 'packed' attribute to base classes.
   // Per GCC's documentation, it only applies to non-static data members.
   CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment();
-  CharUnits BaseAlign = (Packed && Context.getLangOpts().getClangABICompat() <=
-   LangOptions::ClangABI::Ver6)
-? CharUnits::One()
-: UnpackedBaseAlign;
+  CharUnits BaseAlign =
+  (Packed && ((Context.getLangOpts().getClangABICompat() <=
+   LangOptions::ClangABI::Ver6) ||
+  Context.getTargetInfo().getTriple().isPS4()))
+  ? CharUnits::One()
+  : UnpackedBaseAlign;
 
   // If we have an empty base class, try to place it at offset 0.
   if (Base->Class->isEmpty() &&


Index: cfe/trunk/test/CodeGenCXX/alignment.cpp
===
--- cfe/trunk/test/CodeGenCXX/alignment.cpp
+++ cfe/trunk/test/CodeGenCXX/alignment.cpp
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 -fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
 
 extern int int_source();
 extern void int_sink(int x);
Index: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
===
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
@@ -1178,10 +1178,12 @@
   // Clang <= 6 incorrectly applied the 'packed' attribute to base classes.
   // Per GCC's documentation, it only applies to non-static data members.
   CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment();
-  CharUnits BaseAlign = (Packed && Context.getLangOpts().getClangABICompat() <=
-   LangOptions::ClangABI::Ver6)
-? CharUnits::One()
-: UnpackedBaseAlign;
+  CharUnits BaseAlign =
+  (Packed && ((Context.getLangOpts().getClangABICompat() <=
+   LangOptions::ClangABI::Ver6) ||
+  Context.getTargetInfo().getTriple().isPS4()))
+  ? CharUnits::One()
+  : UnpackedBaseAlign;
 
   // If we have an empty base class, try to place it at offset 0.
   if (Base->Class->isEmpty() &&
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D47175: [DOXYGEN] Formatting changes for better intrinsics documentation rendering

2018-05-22 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

LGTM


Repository:
  rC Clang

https://reviews.llvm.org/D47175



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


[PATCH] D41888: [DOXYGEN] documentation changes to emmintrin.h and tmmintrin.h

2018-02-15 Thread Douglas Yung via Phabricator via cfe-commits
dyung accepted this revision.
dyung added a comment.
This revision is now accepted and ready to land.

LGTM


https://reviews.llvm.org/D41888



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


[PATCH] D41507: avxintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fix incorrect wording in various intrinsic descriptions. Previously the 
descriptions used "low-order" and "high-order" when the intended meaning was 
"even-indexed" and "odd-indexed".
2. Fix a few typos and errors found during review.
3. Restore new line endings and change to use hex suffixes (0h instead of 0x0).

These patches were made by Craig Flores


https://reviews.llvm.org/D41507

Files:
  lib/Headers/avxintrin.h

Index: lib/Headers/avxintrin.h
===
--- lib/Headers/avxintrin.h
+++ lib/Headers/avxintrin.h
@@ -1120,7 +1120,7 @@
 /// \param A
 ///A 256-bit vector of [8 x float].
 /// \param C
-///An immediate integer operand specifying how the values are to be \n
+///An immediate integer operand specifying how the values are to be
 ///copied. \n
 ///Bits [1:0]: \n
 ///  00: Bits [31:0] of the source are copied to bits [31:0] of the
@@ -1150,7 +1150,7 @@
 ///  11: Bits [127:96] of the source are copied to bits [95:64] of the
 ///  returned vector. \n
 ///Bits [7:6]: \n
-///  00: Bits [31:qq0] of the source are copied to bits [127:96] of the
+///  00: Bits [31:0] of the source are copied to bits [127:96] of the
 ///  returned vector. \n
 ///  01: Bits [63:32] of the source are copied to bits [127:96] of the
 ///  returned vector. \n
@@ -1665,38 +1665,38 @@
 /// \param c
 ///An immediate integer operand, with bits [4:0] specifying which comparison
 ///operation to use: \n
-///0x00 : Equal (ordered, non-signaling)
-///0x01 : Less-than (ordered, signaling)
-///0x02 : Less-than-or-equal (ordered, signaling)
-///0x03 : Unordered (non-signaling)
-///0x04 : Not-equal (unordered, non-signaling)
-///0x05 : Not-less-than (unordered, signaling)
-///0x06 : Not-less-than-or-equal (unordered, signaling)
-///0x07 : Ordered (non-signaling)
-///0x08 : Equal (unordered, non-signaling)
-///0x09 : Not-greater-than-or-equal (unordered, signaling)
-///0x0a : Not-greater-than (unordered, signaling)
-///0x0b : False (ordered, non-signaling)
-///0x0c : Not-equal (ordered, non-signaling)
-///0x0d : Greater-than-or-equal (ordered, signaling)
-///0x0e : Greater-than (ordered, signaling)
-///0x0f : True (unordered, non-signaling)
-///0x10 : Equal (ordered, signaling)
-///0x11 : Less-than (ordered, non-signaling)
-///0x12 : Less-than-or-equal (ordered, non-signaling)
-///0x13 : Unordered (signaling)
-///0x14 : Not-equal (unordered, signaling)
-///0x15 : Not-less-than (unordered, non-signaling)
-///0x16 : Not-less-than-or-equal (unordered, non-signaling)
-///0x17 : Ordered (signaling)
-///0x18 : Equal (unordered, signaling)
-///0x19 : Not-greater-than-or-equal (unordered, non-signaling)
-///0x1a : Not-greater-than (unordered, non-signaling)
-///0x1b : False (ordered, signaling)
-///0x1c : Not-equal (ordered, signaling)
-///0x1d : Greater-than-or-equal (ordered, non-signaling)
-///0x1e : Greater-than (ordered, non-signaling)
-///0x1f : True (unordered, signaling)
+///00h: Equal (ordered, non-signaling) \n
+///01h: Less-than (ordered, signaling) \n
+///02h: Less-than-or-equal (ordered, signaling) \n
+///03h: Unordered (non-signaling) \n
+///04h: Not-equal (unordered, non-signaling) \n
+///05h: Not-less-than (unordered, signaling) \n
+///06h: Not-less-than-or-equal (unordered, signaling) \n
+///07h: Ordered (non-signaling) \n
+///08h: Equal (unordered, non-signaling) \n
+///09h: Not-greater-than-or-equal (unordered, signaling) \n
+///0Ah: Not-greater-than (unordered, signaling) \n
+///0Bh: False (ordered, non-signaling) \n
+///0Ch: Not-equal (ordered, non-signaling) \n
+///0Dh: Greater-than-or-equal (ordered, signaling) \n
+///0Eh: Greater-than (ordered, signaling) \n
+///0Fh: True (unordered, non-signaling) \n
+///10h: Equal (ordered, signaling) \n
+///11h: Less-than (ordered, non-signaling) \n
+///12h: Less-than-or-equal (ordered, non-signaling) \n
+///13h: Unordered (signaling) \n
+///14h: Not-equal (unordered, signaling) \n
+///15h: Not-less-than (unordered, non-signaling) \n
+///16h: Not-less-than-or-equal (unordered, non-signaling) \n
+///17h: Ordered (signaling) \n
+///18h: Equal (unordered, signaling) \n
+///19h: Not-greater-than-or-equal (unordered, non-signaling) \n
+///1Ah: Not-greater-than (unordered, non-signaling) \n
+///1Bh: False (ordered, signaling) \n
+///1Ch: Not-equal (ordered, signaling) \n
+///1Dh: Greater-than-or-equal (ordered, non-signaling) \n
+///1Eh: Greater-than (ordered, non-signaling) \n
+///1Fh: True (unordered, signal

[PATCH] D41516: emmintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fixed innaccurate instruction mappings for various intrinsics.
2. Fixed description of NaN handling in comparison intrinsics.
3. Unify description of _mm_store_pd1 to match _mm_store1_pd.
4. Fix incorrect wording in various intrinsic descriptions. Previously the 
descriptions used "low-order" and "high-order" when the intended meaning was 
"even-indexed" and "odd-indexed".
5. Fix typos.
6. Add missing italics command (\a) for params and fixed some parameter 
spellings.

These patches were made by Craig Flores


https://reviews.llvm.org/D41516

Files:
  lib/Headers/emmintrin.h

Index: lib/Headers/emmintrin.h
===
--- lib/Headers/emmintrin.h
+++ lib/Headers/emmintrin.h
@@ -217,8 +217,8 @@
 
 /// \brief Calculates the square root of the lower double-precision value of
 ///the second operand and returns it in the lower 64 bits of the result.
-///The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -260,8 +260,8 @@
 
 /// \brief Compares lower 64-bit double-precision values of both operands, and
 ///returns the lesser of the pair of values in the lower 64-bits of the
-///result. The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///result. The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -304,8 +304,8 @@
 
 /// \brief Compares lower 64-bit double-precision values of both operands, and
 ///returns the greater of the pair of values in the lower 64-bits of the
-///result. The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///result. The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -983,8 +983,10 @@
 }
 
 /// \brief Compares the lower double-precision floating-point values in each of
-///the two 128-bit floating-point vectors of [2 x double] for equality. The
-///comparison yields 0 for false, 1 for true.
+///the two 128-bit floating-point vectors of [2 x double] for equality.
+///
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -996,7 +998,8 @@
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
 ///compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comieq_sd(__m128d __a, __m128d __b)
 {
@@ -1008,7 +1011,8 @@
 ///the value in the first parameter is less than the corresponding value in
 ///the second parameter.
 ///
-///The comparison yields 0 for false, 1 for true.
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -1020,7 +1024,8 @@
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
 ///compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comilt_sd(__m128d __a, __m128d __b)
 {
@@ -1032,7 +1037,8 @@
 ///the value in the first parameter is less than or equal to the
 ///corresponding value in the second parameter.
 ///
-///The comparison yields 0 for false, 1 for true.
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -1044,7 +1050,8 @@
 /// \param __b
 /// A 128-bit vector of [2 x double]. The lower double-precision value is
 /// compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comile_sd(__m128d __a, __m128d __b)
 {
@@ -1056,7 +1063,8 @@
 ///the value in the first parameter is g

[PATCH] D41517: mmintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fix instruction mappings/listings for various intrinsics

These patches were made by Craig Flores


https://reviews.llvm.org/D41517

Files:
  lib/Headers/mmintrin.h


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  XOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic corresponds to the  PSHUFD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1399,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic corresponds to the  PSHUFLW  instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1416,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic corresponds to the  PUNPCKLBW + PSHUFLW  instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  XOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic corresponds to the  PSHUFD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1399,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic corresponds to the  PSHUFLW  instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1416,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic corresponds to the  PUNPCKLBW + PSHUFLW  instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l

[PATCH] D41518: pmmintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fix incorrect wording in various intrinsic descriptions. Previously the 
descriptions used "low-order" and "high-order" when the intended meaning was 
"even-indexed" and "odd-indexed".

These patches were made by Craig Flores


https://reviews.llvm.org/D41518

Files:
  lib/Headers/pmmintrin.h


Index: lib/Headers/pmmintrin.h
===
--- lib/Headers/pmmintrin.h
+++ lib/Headers/pmmintrin.h
@@ -115,8 +115,8 @@
   return __builtin_ia32_hsubps((__v4sf)__a, (__v4sf)__b);
 }
 
-/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
-///vector of [4 x float] to float values stored in a 128-bit vector of
+/// \brief Moves and duplicates odd-indexed values from a 128-bit vector
+///of [4 x float] to float values stored in a 128-bit vector of
 ///[4 x float].
 ///
 /// \headerfile 
@@ -137,7 +137,7 @@
   return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 1, 1, 3, 3);
 }
 
-/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of
+/// \brief Duplicates even-indexed values from a 128-bit vector of
 ///[4 x float] to float values stored in a 128-bit vector of [4 x float].
 ///
 /// \headerfile 


Index: lib/Headers/pmmintrin.h
===
--- lib/Headers/pmmintrin.h
+++ lib/Headers/pmmintrin.h
@@ -115,8 +115,8 @@
   return __builtin_ia32_hsubps((__v4sf)__a, (__v4sf)__b);
 }
 
-/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
-///vector of [4 x float] to float values stored in a 128-bit vector of
+/// \brief Moves and duplicates odd-indexed values from a 128-bit vector
+///of [4 x float] to float values stored in a 128-bit vector of
 ///[4 x float].
 ///
 /// \headerfile 
@@ -137,7 +137,7 @@
   return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 1, 1, 3, 3);
 }
 
-/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of
+/// \brief Duplicates even-indexed values from a 128-bit vector of
 ///[4 x float] to float values stored in a 128-bit vector of [4 x float].
 ///
 /// \headerfile 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D41520: smmintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fix formatting issue due to hyphenated terms at line breaks.
2. Fix typo

These patches were made by Craig Flores


https://reviews.llvm.org/D41520

Files:
  lib/Headers/smmintrin.h


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -648,7 +648,7 @@
 ///input vectors are used as an input for dot product; otherwise that input
 ///is treated as zero. Bits [1:0] determine which elements of the result
 ///will receive a copy of the final dot product, with bit [0] corresponding
-///to the lowest element and bit [3] corresponding to the highest element 
of
+///to the lowest element and bit [1] corresponding to the highest element 
of
 ///each [2 x double] vector. If a bit is set, the dot product is returned 
in
 ///the corresponding element; otherwise that element is set to zero.
 #define _mm_dp_pd(X, Y, M) __extension__ ({\
@@ -866,8 +866,8 @@
 ///  11: Copies the selected bits from \a Y to result bits [127:96]. \n
 ///Bits[3:0]: If any of these bits are set, the corresponding result
 ///element is cleared.
-/// \returns A 128-bit vector of [4 x float] containing the copied single-
-///precision floating point elements from the operands.
+/// \returns A 128-bit vector of [4 x float] containing the copied
+///single-precision floating point elements from the operands.
 #define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
 
 /// \brief Extracts a 32-bit integer from a 128-bit vector of [4 x float] and


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -648,7 +648,7 @@
 ///input vectors are used as an input for dot product; otherwise that input
 ///is treated as zero. Bits [1:0] determine which elements of the result
 ///will receive a copy of the final dot product, with bit [0] corresponding
-///to the lowest element and bit [3] corresponding to the highest element of
+///to the lowest element and bit [1] corresponding to the highest element of
 ///each [2 x double] vector. If a bit is set, the dot product is returned in
 ///the corresponding element; otherwise that element is set to zero.
 #define _mm_dp_pd(X, Y, M) __extension__ ({\
@@ -866,8 +866,8 @@
 ///  11: Copies the selected bits from \a Y to result bits [127:96]. \n
 ///Bits[3:0]: If any of these bits are set, the corresponding result
 ///element is cleared.
-/// \returns A 128-bit vector of [4 x float] containing the copied single-
-///precision floating point elements from the operands.
+/// \returns A 128-bit vector of [4 x float] containing the copied
+///single-precision floating point elements from the operands.
 #define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
 
 /// \brief Extracts a 32-bit integer from a 128-bit vector of [4 x float] and
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D41523: xmmintrin.h documentation fixes and updates

2017-12-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.

This is the result of several patches we made internally to update the 
documentation that we would like to have reviewed for possible submission.

The changes include:

1. Fix inaccurate instruction listings.
2. Fix small issues in _mm_getcsr and _mm_setcsr.
3. Fix description of NaN handling in comparison intrinsics.
4. Fix inaccurate description of _mm_movemask_pi8.
5. Fix inaccurate instruction mappings.
6. Fix typos.
7. Clarify wording on some descriptions.
8. Fix bit ranges in return value.
9. Fix typo in _mm_move_ms intrinsic instruction since it operates on 
singe-precision values, not double.

These patches were made by Craig Flores


https://reviews.llvm.org/D41523

Files:
  lib/Headers/xmmintrin.h

Index: lib/Headers/xmmintrin.h
===
--- lib/Headers/xmmintrin.h
+++ lib/Headers/xmmintrin.h
@@ -1011,6 +1011,8 @@
 /// \brief Compares two 32-bit float values in the low-order bits of both
 ///operands for equality and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS 
@@ -1022,7 +1024,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the
+///two lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comieq_ss(__m128 __a, __m128 __b)
 {
@@ -1033,6 +1036,8 @@
 ///operands to determine if the first operand is less than the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS 
@@ -1044,7 +1049,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comilt_ss(__m128 __a, __m128 __b)
 {
@@ -1055,6 +1061,8 @@
 ///operands to determine if the first operand is less than or equal to the
 ///second operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1065,7 +1073,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comile_ss(__m128 __a, __m128 __b)
 {
@@ -1076,6 +1085,8 @@
 ///operands to determine if the first operand is greater than the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1086,7 +1097,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the
+/// two lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comigt_ss(__m128 __a, __m128 __b)
 {
@@ -1097,6 +1109,8 @@
 ///operands to determine if the first operand is greater than or equal to
 ///the second operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1107,7 +1121,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+///lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comige_ss(__m128 __a, __m128 __b)
 {
@@ -1118,6 +1133,8 @@
 ///operands to determine if the first operand is not equal to the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 1 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic correspo

[PATCH] D41516: emmintrin.h documentation fixes and updates

2018-01-02 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321669: [DOXYGEN] Fix doxygen and content issues in 
emmintrin.h (authored by dyung, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41516?vs=127939&id=128447#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41516

Files:
  cfe/trunk/lib/Headers/emmintrin.h

Index: cfe/trunk/lib/Headers/emmintrin.h
===
--- cfe/trunk/lib/Headers/emmintrin.h
+++ cfe/trunk/lib/Headers/emmintrin.h
@@ -217,8 +217,8 @@
 
 /// \brief Calculates the square root of the lower double-precision value of
 ///the second operand and returns it in the lower 64 bits of the result.
-///The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -260,8 +260,8 @@
 
 /// \brief Compares lower 64-bit double-precision values of both operands, and
 ///returns the lesser of the pair of values in the lower 64-bits of the
-///result. The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///result. The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -304,8 +304,8 @@
 
 /// \brief Compares lower 64-bit double-precision values of both operands, and
 ///returns the greater of the pair of values in the lower 64-bits of the
-///result. The upper 64 bits of the result are copied from the upper double-
-///precision value of the first operand.
+///result. The upper 64 bits of the result are copied from the upper
+///double-precision value of the first operand.
 ///
 /// \headerfile 
 ///
@@ -983,8 +983,10 @@
 }
 
 /// \brief Compares the lower double-precision floating-point values in each of
-///the two 128-bit floating-point vectors of [2 x double] for equality. The
-///comparison yields 0 for false, 1 for true.
+///the two 128-bit floating-point vectors of [2 x double] for equality.
+///
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -996,7 +998,8 @@
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
 ///compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comieq_sd(__m128d __a, __m128d __b)
 {
@@ -1008,7 +1011,8 @@
 ///the value in the first parameter is less than the corresponding value in
 ///the second parameter.
 ///
-///The comparison yields 0 for false, 1 for true.
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -1020,7 +1024,8 @@
 /// \param __b
 ///A 128-bit vector of [2 x double]. The lower double-precision value is
 ///compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comilt_sd(__m128d __a, __m128d __b)
 {
@@ -1032,7 +1037,8 @@
 ///the value in the first parameter is less than or equal to the
 ///corresponding value in the second parameter.
 ///
-///The comparison yields 0 for false, 1 for true.
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -1044,7 +1050,8 @@
 /// \param __b
 /// A 128-bit vector of [2 x double]. The lower double-precision value is
 /// compared to the lower double-precision value of \a __a.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower double-precision values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comile_sd(__m128d __a, __m128d __b)
 {
@@ -1056,7 +1063,8 @@
 ///the value in the first parameter is greater than the corresponding value
 ///in the second parameter.
 ///
-///The comparison yields 0 for false, 1 for true.
+///The comparison yields 0 for false, 1 for true. If either of the two
+///lower double-precision values is NaN, 0 is returned.
 ///
 /// \headerfile 
 ///
@@ -1068,7 +1076,8 @@
 /// \param __b
 ///A 128-bit vector of [2 x double]. The 

[PATCH] D41518: pmmintrin.h documentation fixes and updates

2018-01-02 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321670: [DOXYGEN] Fix doxygen and content issues in 
pmmintrin.h (authored by dyung, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41518?vs=127947&id=128448#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41518

Files:
  cfe/trunk/lib/Headers/pmmintrin.h


Index: cfe/trunk/lib/Headers/pmmintrin.h
===
--- cfe/trunk/lib/Headers/pmmintrin.h
+++ cfe/trunk/lib/Headers/pmmintrin.h
@@ -115,8 +115,8 @@
   return __builtin_ia32_hsubps((__v4sf)__a, (__v4sf)__b);
 }
 
-/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
-///vector of [4 x float] to float values stored in a 128-bit vector of
+/// \brief Moves and duplicates odd-indexed values from a 128-bit vector
+///of [4 x float] to float values stored in a 128-bit vector of
 ///[4 x float].
 ///
 /// \headerfile 
@@ -137,7 +137,7 @@
   return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 1, 1, 3, 3);
 }
 
-/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of
+/// \brief Duplicates even-indexed values from a 128-bit vector of
 ///[4 x float] to float values stored in a 128-bit vector of [4 x float].
 ///
 /// \headerfile 


Index: cfe/trunk/lib/Headers/pmmintrin.h
===
--- cfe/trunk/lib/Headers/pmmintrin.h
+++ cfe/trunk/lib/Headers/pmmintrin.h
@@ -115,8 +115,8 @@
   return __builtin_ia32_hsubps((__v4sf)__a, (__v4sf)__b);
 }
 
-/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
-///vector of [4 x float] to float values stored in a 128-bit vector of
+/// \brief Moves and duplicates odd-indexed values from a 128-bit vector
+///of [4 x float] to float values stored in a 128-bit vector of
 ///[4 x float].
 ///
 /// \headerfile 
@@ -137,7 +137,7 @@
   return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 1, 1, 3, 3);
 }
 
-/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of
+/// \brief Duplicates even-indexed values from a 128-bit vector of
 ///[4 x float] to float values stored in a 128-bit vector of [4 x float].
 ///
 /// \headerfile 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D41520: smmintrin.h documentation fixes and updates

2018-01-02 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321671: [DOXYGEN] Fix doxygen and content issues in 
smmintrin.h (authored by dyung, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41520?vs=127949&id=128449#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41520

Files:
  cfe/trunk/lib/Headers/smmintrin.h


Index: cfe/trunk/lib/Headers/smmintrin.h
===
--- cfe/trunk/lib/Headers/smmintrin.h
+++ cfe/trunk/lib/Headers/smmintrin.h
@@ -648,7 +648,7 @@
 ///input vectors are used as an input for dot product; otherwise that input
 ///is treated as zero. Bits [1:0] determine which elements of the result
 ///will receive a copy of the final dot product, with bit [0] corresponding
-///to the lowest element and bit [3] corresponding to the highest element 
of
+///to the lowest element and bit [1] corresponding to the highest element 
of
 ///each [2 x double] vector. If a bit is set, the dot product is returned 
in
 ///the corresponding element; otherwise that element is set to zero.
 #define _mm_dp_pd(X, Y, M) __extension__ ({\
@@ -866,8 +866,8 @@
 ///  11: Copies the selected bits from \a Y to result bits [127:96]. \n
 ///Bits[3:0]: If any of these bits are set, the corresponding result
 ///element is cleared.
-/// \returns A 128-bit vector of [4 x float] containing the copied single-
-///precision floating point elements from the operands.
+/// \returns A 128-bit vector of [4 x float] containing the copied
+///single-precision floating point elements from the operands.
 #define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
 
 /// \brief Extracts a 32-bit integer from a 128-bit vector of [4 x float] and


Index: cfe/trunk/lib/Headers/smmintrin.h
===
--- cfe/trunk/lib/Headers/smmintrin.h
+++ cfe/trunk/lib/Headers/smmintrin.h
@@ -648,7 +648,7 @@
 ///input vectors are used as an input for dot product; otherwise that input
 ///is treated as zero. Bits [1:0] determine which elements of the result
 ///will receive a copy of the final dot product, with bit [0] corresponding
-///to the lowest element and bit [3] corresponding to the highest element of
+///to the lowest element and bit [1] corresponding to the highest element of
 ///each [2 x double] vector. If a bit is set, the dot product is returned in
 ///the corresponding element; otherwise that element is set to zero.
 #define _mm_dp_pd(X, Y, M) __extension__ ({\
@@ -866,8 +866,8 @@
 ///  11: Copies the selected bits from \a Y to result bits [127:96]. \n
 ///Bits[3:0]: If any of these bits are set, the corresponding result
 ///element is cleared.
-/// \returns A 128-bit vector of [4 x float] containing the copied single-
-///precision floating point elements from the operands.
+/// \returns A 128-bit vector of [4 x float] containing the copied
+///single-precision floating point elements from the operands.
 #define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
 
 /// \brief Extracts a 32-bit integer from a 128-bit vector of [4 x float] and
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D41507: avxintrin.h documentation fixes and updates

2018-01-06 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 128861.
dyung added a comment.

Updated change to address review feedback.


https://reviews.llvm.org/D41507

Files:
  avxintrin.h

Index: avxintrin.h
===
--- avxintrin.h
+++ avxintrin.h
@@ -1120,7 +1120,7 @@
 /// \param A
 ///A 256-bit vector of [8 x float].
 /// \param C
-///An immediate integer operand specifying how the values are to be \n
+///An immediate integer operand specifying how the values are to be
 ///copied. \n
 ///Bits [1:0]: \n
 ///  00: Bits [31:0] of the source are copied to bits [31:0] of the
@@ -1150,7 +1150,7 @@
 ///  11: Bits [127:96] of the source are copied to bits [95:64] of the
 ///  returned vector. \n
 ///Bits [7:6]: \n
-///  00: Bits [31:qq0] of the source are copied to bits [127:96] of the
+///  00: Bits [31:0] of the source are copied to bits [127:96] of the
 ///  returned vector. \n
 ///  01: Bits [63:32] of the source are copied to bits [127:96] of the
 ///  returned vector. \n
@@ -1665,38 +1665,38 @@
 /// \param c
 ///An immediate integer operand, with bits [4:0] specifying which comparison
 ///operation to use: \n
-///0x00 : Equal (ordered, non-signaling)
-///0x01 : Less-than (ordered, signaling)
-///0x02 : Less-than-or-equal (ordered, signaling)
-///0x03 : Unordered (non-signaling)
-///0x04 : Not-equal (unordered, non-signaling)
-///0x05 : Not-less-than (unordered, signaling)
-///0x06 : Not-less-than-or-equal (unordered, signaling)
-///0x07 : Ordered (non-signaling)
-///0x08 : Equal (unordered, non-signaling)
-///0x09 : Not-greater-than-or-equal (unordered, signaling)
-///0x0a : Not-greater-than (unordered, signaling)
-///0x0b : False (ordered, non-signaling)
-///0x0c : Not-equal (ordered, non-signaling)
-///0x0d : Greater-than-or-equal (ordered, signaling)
-///0x0e : Greater-than (ordered, signaling)
-///0x0f : True (unordered, non-signaling)
-///0x10 : Equal (ordered, signaling)
-///0x11 : Less-than (ordered, non-signaling)
-///0x12 : Less-than-or-equal (ordered, non-signaling)
-///0x13 : Unordered (signaling)
-///0x14 : Not-equal (unordered, signaling)
-///0x15 : Not-less-than (unordered, non-signaling)
-///0x16 : Not-less-than-or-equal (unordered, non-signaling)
-///0x17 : Ordered (signaling)
-///0x18 : Equal (unordered, signaling)
-///0x19 : Not-greater-than-or-equal (unordered, non-signaling)
-///0x1a : Not-greater-than (unordered, non-signaling)
-///0x1b : False (ordered, signaling)
-///0x1c : Not-equal (ordered, signaling)
-///0x1d : Greater-than-or-equal (ordered, non-signaling)
-///0x1e : Greater-than (ordered, non-signaling)
-///0x1f : True (unordered, signaling)
+///0x00: Equal (ordered, non-signaling) \n
+///0x01: Less-than (ordered, signaling) \n
+///0x02: Less-than-or-equal (ordered, signaling) \n
+///0x03: Unordered (non-signaling) \n
+///0x04: Not-equal (unordered, non-signaling) \n
+///0x05: Not-less-than (unordered, signaling) \n
+///0x06: Not-less-than-or-equal (unordered, signaling) \n
+///0x07: Ordered (non-signaling) \n
+///0x08: Equal (unordered, non-signaling) \n
+///0x09: Not-greater-than-or-equal (unordered, signaling) \n
+///0x0A: Not-greater-than (unordered, signaling) \n
+///0x0B: False (ordered, non-signaling) \n
+///0x0C: Not-equal (ordered, non-signaling) \n
+///0x0D: Greater-than-or-equal (ordered, signaling) \n
+///0x0E: Greater-than (ordered, signaling) \n
+///0x0F: True (unordered, non-signaling) \n
+///0x10: Equal (ordered, signaling) \n
+///0x11: Less-than (ordered, non-signaling) \n
+///0x12: Less-than-or-equal (ordered, non-signaling) \n
+///0x13: Unordered (signaling) \n
+///0x14: Not-equal (unordered, signaling) \n
+///0x15: Not-less-than (unordered, non-signaling) \n
+///0x16: Not-less-than-or-equal (unordered, non-signaling) \n
+///0x17: Ordered (signaling) \n
+///0x18: Equal (unordered, signaling) \n
+///0x19: Not-greater-than-or-equal (unordered, non-signaling) \n
+///0x1A: Not-greater-than (unordered, non-signaling) \n
+///0x1B: False (ordered, signaling) \n
+///0x1C: Not-equal (ordered, signaling) \n
+///0x1D: Greater-than-or-equal (ordered, non-signaling) \n
+///0x1E: Greater-than (ordered, non-signaling) \n
+///0x1F: True (unordered, signaling)
 /// \returns A 128-bit vector of [2 x double] containing the comparison results.
 #define _mm_cmp_pd(a, b, c) __extension__ ({ \
   (__m128d)__builtin_ia32_cmppd((__v2df)(__m128d)(a), \
@@ -1725,38 +1725,38 @@
 /// \param c
 ///An immediate integer operand, with bits [4:0] specifying which comparison
 ///operation to use: \n
-///0x00 : Equal (ordered, non-signaling)
-///0x01 : Less-than (ordered, signaling)
-///0x02 : Less-than-or-equa

[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments.



Comment at: lib/Headers/xmmintrin.h:1927
 ///
-/// This intrinsic corresponds to the  VPEXTRQ / MOVQ  instruction.
+/// This intrinsic corresponds to the  VPEXTRQ / PEXTRQ  instruction.
 ///

RKSimon wrote:
> Not necessarily, it could be (v)movhps/(v)movhpd - but those are tricky to 
> generate in current isel.
Would it be preferred then for this to be the following:

```
/// This intrinsic corresponds to the  VPEXTRQ / PEXTRQ / VMOVHPS / VMOVHPD 
/ MOVHPS / MOVHPD  instruction.
```


https://reviews.llvm.org/D41523



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


[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-01-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments.



Comment at: lib/Headers/mmintrin.h:1402
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic corresponds to the  PSHUFLW  instruction.
 ///

craig.topper wrote:
> This is overly specific
Just to be clear, when you say this is overly specific, you are saying that it 
should be replaced with the text "This intrinsic is a utility function and does 
not correspond to a specific instruction."  Is that correct?


https://reviews.llvm.org/D41517



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


[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-01-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 129015.
dyung added a comment.

Updating diff based on review feedback.


https://reviews.llvm.org/D41517

Files:
  lib/Headers/mmintrin.h


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1382,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1401,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1419,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  VMOVQ / MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1382,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1401,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1419,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D41523: xmmintrin.h documentation fixes and updates

2018-01-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 129021.
dyung added a comment.

Update review based on feedback.


https://reviews.llvm.org/D41523

Files:
  lib/Headers/xmmintrin.h

Index: lib/Headers/xmmintrin.h
===
--- lib/Headers/xmmintrin.h
+++ lib/Headers/xmmintrin.h
@@ -1011,6 +1011,8 @@
 /// \brief Compares two 32-bit float values in the low-order bits of both
 ///operands for equality and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS 
@@ -1022,7 +1024,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the
+///two lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comieq_ss(__m128 __a, __m128 __b)
 {
@@ -1033,6 +1036,8 @@
 ///operands to determine if the first operand is less than the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS 
@@ -1044,7 +1049,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comilt_ss(__m128 __a, __m128 __b)
 {
@@ -1055,6 +1061,8 @@
 ///operands to determine if the first operand is less than or equal to the
 ///second operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1065,7 +1073,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+/// lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comile_ss(__m128 __a, __m128 __b)
 {
@@ -1076,6 +1085,8 @@
 ///operands to determine if the first operand is greater than the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1086,7 +1097,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the
+/// two lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comigt_ss(__m128 __a, __m128 __b)
 {
@@ -1097,6 +1109,8 @@
 ///operands to determine if the first operand is greater than or equal to
 ///the second operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 0 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1107,7 +1121,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the two
+///lower 32-bit values is NaN, 0 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comige_ss(__m128 __a, __m128 __b)
 {
@@ -1118,6 +1133,8 @@
 ///operands to determine if the first operand is not equal to the second
 ///operand and returns the result of the comparison.
 ///
+///If either of the two lower 32-bit values is NaN, 1 is returned.
+///
 /// \headerfile 
 ///
 /// This intrinsic corresponds to the  VCOMISS / COMISS  instructions.
@@ -1128,7 +1145,8 @@
 /// \param __b
 ///A 128-bit vector of [4 x float]. The lower 32 bits of this operand are
 ///used in the comparison.
-/// \returns An integer containing the comparison results.
+/// \returns An integer containing the comparison results. If either of the
+/// two lower 32-bit values is NaN, 1 is returned.
 static __inline__ int __DEFAULT_FN_ATTRS
 _mm_comineq_ss(__m128 __a, __m128 __b)
 {
@@ -1139,6 +1157,8 @@
 ///the low-order bits of both operands to determine equality and returns
 ///

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-02-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 136221.
dyung added a comment.

Updated documentation for instruction generated for _mm_cvtsi32_si64, 
_mm_cvtsi64_si32, _mm_cvtsi64_m64 and _mm_cvtm64_si64 based on feedback.


https://reviews.llvm.org/D41517

Files:
  lib/Headers/mmintrin.h


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1382,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1401,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1419,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1382,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1401,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1419,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 //

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-02-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done.
dyung added inline comments.



Comment at: lib/Headers/mmintrin.h:55
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///

efriedma wrote:
> RKSimon wrote:
> > efriedma wrote:
> > > craig.topper wrote:
> > > > kromanova wrote:
> > > > > I tried clang on Linux, x86_64, and if -mavx option is passed, we 
> > > > > generate VMOVD, if this option is omitted, we generate MOVD.
> > > > > I think I understand the rational behind this change (namely, to keep 
> > > > > MOVD, but remove VMOVD),
> > > > > since this intrinsic should use MMX registers and shouldn't have 
> > > > > corresponding AVX instruction(s).
> > > > > 
> > > > > However, that's what we generate at the moment when -mavx is passed 
> > > > > (I suspect because our MMX support is limited)
> > > > > vmovd   %edi, %xmm0
> > > > > 
> > > > > Since we are writing the documentation for clang compiler, we should 
> > > > > document what clang compiler is doing, not what is should be doing.
> > > > > Craig, what do you think? Should we revert back to VMOVD/MOVD?
> > > > > 
> > > > We can change it back to VMOVD/MOVD
> > > The reference to vmovd seems confusing.  Yes, LLVM compiles 
> > > `_mm_movpi64_epi64(_mm_cvtsi32_si64(i))` to vmovd, but that doesn't mean 
> > > either of those intrinsics "corresponds" to vmovd; that's just the 
> > > optimizer combining two operations into one.
> > Should all these _mm_cvt* intrinsics be replaced with a 'this is a utility 
> > function' style comment like the _mm_set1* intrinsics?
> In general, I think "corresponds to" should mean "if the inputs are produced 
> by an inline asm, and the output is used by an inline asm, and the lowering 
> will produce a single instruction, what instruction will we generate?".  
> That's unambiguous, and will usually give a useful hint to the user.  In this 
> case, on trunk, the answer is consistently "movd".
> 
> Otherwise, it's not clear what it means for an intrinsic to correspond to 
> anything; optimizations exist which can modify the instructions we choose for 
> almost any intrinsic.
Thanks for the feedback. I wrote a few small examples and noted that the 
instructions generated by the compiler were the non-avx form by default for 
this and the next three _mm_cvt* intrinsics as you indicated, so I have updated 
the documentation to list the non-avx instruction. Additionally, in some 
discussions, it was pointed out that these are MMX intrinsics, so the AVX 
instructions would not have been generated.


https://reviews.llvm.org/D41517



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


[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-03-07 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 137333.
dyung marked an inline comment as done.
dyung added a comment.

Update based on feedback from Simon.


https://reviews.llvm.org/D41517

Files:
  lib/Headers/mmintrin.h


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  PXOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1400,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1418,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the


Index: lib/Headers/mmintrin.h
===
--- lib/Headers/mmintrin.h
+++ lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  PXOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1400,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1418,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the
___
cfe-comm

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-03-08 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL327090: [DOXYGEN] Fix doxygen and content issues in 
mmintrin.h (authored by dyung, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D41517?vs=137333&id=137674#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41517

Files:
  cfe/trunk/lib/Headers/mmintrin.h


Index: cfe/trunk/lib/Headers/mmintrin.h
===
--- cfe/trunk/lib/Headers/mmintrin.h
+++ cfe/trunk/lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  PXOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to 
zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1400,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1418,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __b
 ///An 8-bit integer value used to initialize each vector element of the


Index: cfe/trunk/lib/Headers/mmintrin.h
===
--- cfe/trunk/lib/Headers/mmintrin.h
+++ cfe/trunk/lib/Headers/mmintrin.h
@@ -52,7 +52,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __i
 ///A 32-bit integer value.
@@ -69,7 +69,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVD / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVD  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -85,7 +85,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __i
 ///A 64-bit signed integer.
@@ -101,7 +101,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VMOVQ / MOVD  instruction.
+/// This intrinsic corresponds to the  MOVQ  instruction.
 ///
 /// \param __m
 ///A 64-bit integer vector.
@@ -1289,7 +1289,7 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VXORPS / XORPS  instruction.
+/// This intrinsic corresponds to the  PXOR  instruction.
 ///
 /// \returns An initialized 64-bit integer vector with all elements set to zero.
 static __inline__ __m64 __DEFAULT_FN_ATTRS
@@ -1381,7 +1381,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFD / PSHUFD  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __i
 ///A 32-bit integer value used to initialize each vector element of the
@@ -1399,7 +1400,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPSHUFLW / PSHUFLW  instruction.
+/// This intrinsic is a utility function and does not correspond to a specific
+///instruction.
 ///
 /// \param __w
 ///A 16-bit integer value used to initialize each vector element of the
@@ -1416,8 +1418,8 @@
 ///
 /// \headerfile 
 ///
-/// This intrinsic corresponds to the  VPUNPCKLBW + VPSHUFLW / PUNPCKLBW +
-///PSHUFLW  ins

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In https://reviews.llvm.org/D45050#1281178, @whisperity wrote:

> I have installed said Ubuntu in a virtual machine for testing this, but 
> unfortunately only the following Clangs are available in the package manager 
> for `Trusty`:
>
>   clang - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.3 - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.4 - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.5 - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.6 - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.8 - C, C++ and Objective-C compiler (LLVM based)
>   clang-3.9 - C, C++ and Objective-C compiler (LLVM based)
>
>
> (Where `clang` is just a synonym for `clang-3.4`.) **There is no Clang 3.7 in 
> the package upstream, it seems.**


Hi, I did not initially setup the machine that hit the failure, so I cannot say 
for certain where it got clang. I did notice though that the llvm.org releases 
page does seem to include a download link for clang 3.7.1 for ubuntu 14.04 
(http://releases.llvm.org/3.7.1/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz).

>  --
> 
> However, **`16.04 LTS (Xenial)`** at the time of writing this comment has an 
> `clang-3.7` package, specifically this version:
> 
>   Ubuntu clang version 3.7.1-2ubuntu2 (tags/RELEASE_371/final) (based on LLVM 
> 3.7.1)
>   Target: x86_64-pc-linux-gnu
>   Thread model: posix
> 
> 
> With this I can confirm I get a huge trace and the template depth overflow 
> failure.
> 
> However, from the filename-line mappings of the preprocessed output, I can 
> see that the `type_traits` header comes from 
> `/usr/include/c++/4.8/type_traits`, which is a version **4.8** standard 
> library, but installing the `clang-3.7` package (through some transitivity in 
> `libasan` and such) depended on `gcc-`**`5`**`-base`, upgrading it from the 
> system-default `5.3.1` to `5.4.0`.
> 
> Isn't this a discrepancy, relying on an older standard library than what is 
> seemingly available on the system?

Again, I'm not sure how the toolchain was installed on the system, and if it 
was installed by simply unzipping the tarball above (or similar) then I could 
see how dependencies could go unmet. Offhand I do not even know if gcc 5+ is 
installed on the machine, but I can check if you think it is important.


https://reviews.llvm.org/D45050



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


[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-05-01 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D61187#1486249 , @probinson wrote:

> FYI, we had to disable clangd entirely after this patch, getting a weird 
> problem with lit that we haven't figured out yet.
>  In case anybody else has seen something like this, and knows what's going 
> on, please let us know.
>
> Running all regression tests
> llvm-lit.py: 
> C:/j/w/opensource/opensource_to_sce_merge__2/o/llvm\utils\lit\lit\llvm\config.py:336:
>  fatal: couldn't find 'clang' program, try setting CLANG in your environment
>   C:\Program Files 
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): 
> error MSB6006: "cmd.exe" exited with code 2. 
> [C:\j\w\opensource\opensource_to_sce_merge__2\build\check-all.vcxproj]
>


To expand on this, I attempted to do a clean upstream build/test with a recent 
revision (r359727 if it matters), and I am seeing this error when attempting to 
use Visual Studio to build/test on Windows. Due to the nature of the problem, I 
suspect anyone using XCode to build/test would also run into a similar problem.

In my build, if I put a breakpoint in the script right before it emits the 
error and dump the path, the problem is pretty obvious in the first entry:

'c:\\src\\upstream\\359727-win32-release\\%(build_mode)s\\bin

This appears to be a cmake related problem because the "%(build_mode)s" should 
have been replaced by "Release" in this case. These kinds of problems often 
only manifest when building using Visual Studio or XCode since the build 
configuration isn't set until build time.

Both the clangd and clangd unit tests seem to have this problem. The problem is 
not eliminated until I remove both sets of tests from the command line used to 
run the tests. Unfortunately I don't really have the expertise to fix these 
problems, but maybe someone else does. But until it is fixed, testing of clangd 
with either Visual Studio or XCode is likely broken.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61187/new/

https://reviews.llvm.org/D61187



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


[PATCH] D61790: [C++20] add Basic consteval specifier

2019-06-14 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, the test cxx2a-consteval.cpp that you added in this commit is failing on 
the PS4 Windows bot.

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/9/steps/test/logs/stdio

  FAIL: Clang :: SemaCXX/cxx2a-consteval.cpp (13131 of 50204)
   TEST 'Clang :: SemaCXX/cxx2a-consteval.cpp' FAILED 

  Script:
  --
  : 'RUN: at line 1';   
c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe
 -cc1 -internal-isystem 
c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\lib\clang\9.0.0\include
 -nostdsysteminc -std=c++2a -fsyntax-only 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 -verify
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ 
"c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe"
 "-cc1" "-internal-isystem" 
"c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\lib\clang\9.0.0\include"
 "-nostdsysteminc" "-std=c++2a" "-fsyntax-only" 
"C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp"
 "-verify"
  # command stderr:
  error: 'error' diagnostics expected but not seen: 
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 9 (directive at 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp:10):
 cannot combine
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 30: destructor cannot be marked consteval
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 33: struct cannot be marked consteval
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 35: typedef cannot be consteval
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 40: consteval can only be used in function declarations
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 42: consteval can only be used in function declarations
  
  error: 'error' diagnostics seen but not expected: 
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 30: destructor cannot be marked constexpr
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 33: struct cannot be marked constexpr
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 35: typedef cannot be constexpr
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 42: constexpr can only be used in variable and function declarations
  
  error: 'warning' diagnostics seen but not expected: 
  
File 
C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\SemaCXX\cxx2a-consteval.cpp
 Line 9: duplicate 'constexpr' declaration specifier
  
  11 errors generated.
  
  
  error: command failed with exit status: 1

Can you take a look?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61790/new/

https://reviews.llvm.org/D61790



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added reviewers: thakis, rnk.
dyung added a project: clang.

A previous change D65233  (r367165) attempted 
to fix this issue, but it missed a case where the integrated assembler is not 
being used. For example, consider the case where clang is invoked with -E and 
also -fno-integrated-as, the compiler was not supressing the warnings about 
unused arguments. This change attempts to fix that as well as expand the 
testing added in the previous commit to cover both scenarios.


Repository:
  rC Clang

https://reviews.llvm.org/D65974

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/as-options.s


Index: clang/test/Driver/as-options.s
===
--- clang/test/Driver/as-options.s
+++ clang/test/Driver/as-options.s
@@ -39,30 +39,62 @@
 // Test that assembler options don't cause warnings when there's no assembler
 // stage.
 
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
 // NOWARN-NOT: unused
 
 // Test that unsupported arguments do not cause errors when -fno-integrated-as
Index: clang/lib/Driver/ToolChains/Clang.cpp
===
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3556,7 +3556,7 @@
   if (!isa(JA)) {
 // The args claimed here should match the args used in
 // CollectArgsForIntegratedAssembler().
-if (TC.useIntegratedAs()) {
+if (TC.useIntegratedAs() || isa(JA)) {
   Args.ClaimAllArgs(options::OPT_mrelax_all

[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done.
dyung added inline comments.



Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3559
 // CollectArgsForIntegratedAssembler().
-if (TC.useIntegratedAs()) {
+if (TC.useIntegratedAs() || isa(JA)) {
   Args.ClaimAllArgs(options::OPT_mrelax_all);

thakis wrote:
> We shouldn't claim the OPT_m flags if we don't use integrated-as. Claiming 
> Wa_COMMA and Xassembler makes sense to me.
If we do not, then one of the tests you included in this change will fail if a 
platform defaults to not using the integrated assembler. Should I remove this 
change and just update the test to explicitly set 
-fintegrated-as/-fno-integrated-as and test for the expected result?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 214278.
dyung added a comment.

Reverted changes in Clang.cpp and updated test to expect warning when an 
external assembler is requested.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974

Files:
  clang/test/Driver/as-options.s


Index: clang/test/Driver/as-options.s
===
--- clang/test/Driver/as-options.s
+++ clang/test/Driver/as-options.s
@@ -39,30 +39,62 @@
 // Test that assembler options don't cause warnings when there's no assembler
 // stage.
 
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
 // NOWARN-NOT: unused
 
 // Test that unsupported arguments do not cause errors when -fno-integrated-as


Index: clang/test/Driver/as-options.s
===
--- clang/test/Driver/as-options.s
+++ clang/test/Driver/as-options.s
@@ -39,30 +39,62 @@
 // Test that assembler options don't cause warnings when there's no assembler
 // stage.
 
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:  

[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done.
dyung added inline comments.



Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3559
 // CollectArgsForIntegratedAssembler().
-if (TC.useIntegratedAs()) {
+if (TC.useIntegratedAs() || isa(JA)) {
   Args.ClaimAllArgs(options::OPT_mrelax_all);

thakis wrote:
> dyung wrote:
> > thakis wrote:
> > > We shouldn't claim the OPT_m flags if we don't use integrated-as. 
> > > Claiming Wa_COMMA and Xassembler makes sense to me.
> > If we do not, then one of the tests you included in this change will fail 
> > if a platform defaults to not using the integrated assembler. Should I 
> > remove this change and just update the test to explicitly set 
> > -fintegrated-as/-fno-integrated-as and test for the expected result?
> Yes, tests for the -m flags should pass `-fintegrated-as`. Sorry about 
> missing that. Out of curiosity, which platforms still use external assemblers 
> by default?
Thanks, I have done this and uploaded a new revision with the test changes.

We use an external assembler internally for some legacy projects/reasons.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done.
dyung added a comment.

In D65974#1623140 , @thakis wrote:

> Thanks! Looks like the change to the cpp file got lost? I only see the test 
> change now.


Yes, I abandoned that change as I thought you said it was unnecessary and just 
left the test changes, but updated the test changes to look for the warning 
when a -m option is used with -fno-integrated-as.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Oh, I just re-read your comments and realized that we should claim the Wa_COMMA 
and Xassembler arguments, I'll reinstate the change to just claim those.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Actually it seems your original change already implemented that, so I think 
only the updated test change that I made is needed. Let me know if you disagree 
with that.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

2019-08-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D65974#1623368 , @thakis wrote:

> Something like "fix test for out-of-tree targets that don't enable the 
> internal assembler by default by explicitly passing -fintegrated-as 
> everywhere" or something like that.


Thanks. I had to figure out how to update the summary as I have never done that 
before!

Let me know if you have any other objections, otherwise, I'll make a further 
update to the summary just before I commit the change.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974



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


[PATCH] D65974: Update test to explicitly test with -fintegrated-as and -fno-integrated-as and to expect warnings when appropriate.

2019-08-09 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL368474: Update test to explicity test with -fintegrated-as 
and -fno-integrated-as and… (authored by dyung, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65974?vs=214278&id=214428#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974

Files:
  cfe/trunk/test/Driver/as-options.s


Index: cfe/trunk/test/Driver/as-options.s
===
--- cfe/trunk/test/Driver/as-options.s
+++ cfe/trunk/test/Driver/as-options.s
@@ -39,30 +39,62 @@
 // Test that assembler options don't cause warnings when there's no assembler
 // stage.
 
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x c++ %s 2>&1 \
+// RUN:   -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
-// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
+// RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E \
+
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
+// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
 // RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E 
-fintegrated-as \
 // RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
+// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
+
 // NOWARN-NOT: unused
 
 // Test that unsupported arguments do not cause errors when -fno-integrated-as


Index: cfe/trunk/test/Driver/as-options.s
===
--- cfe/trunk/test/Driver/as-options.s
+++ cfe/trunk/test/Driver/as-options.s
@@ -39,30 +39,62 @@
 // Test that assembler options don't cause warnings when there's no assembler
 // stage.
 
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
 // RUN:   -o /dev/null -x c++ %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
-// RUN: %clang -mincremental-linker-compatible -E \
+// RUN: %clang -mincremental-l

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

It's probably a pathological case, but wouldn't this still fail if the build 
directory contained ".s" followed by a space in the name? Something like 
"build-foo.s bar"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66176/new/

https://reviews.llvm.org/D66176



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


[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-08-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Taking a step back and thinking about this, the compile command uses "-S", but 
explicitly specifies the output file to be "%t/module.pcm.o" (even though it is 
generating an assembly file instead of an object file), could we change the 
test to just check for "-o {{.*}}module.pcm.o "? That would work in all cases I 
think except for the extreme corner case where that string was part of the 
build directory name.




Comment at: clang/test/Driver/modules.cpp:19
+// CHECK-COMPILE-SAME: {{ -o }}
+// CHECK-COMPILE-SAME: module{{2*}}.{{pcm.o|s}}
 // CHECK-COMPILE-SAME: -x pcm

I'm not sure what the regex module{{2*}} is supposed to match, or prevent from 
matching? Was this intentional?

It seems it would match "module", "module2", "module22", "module222", etc. When 
would the compiler ever generate anything other than the first? Unless you are 
trying to protect yourself against a build directory that contains module in 
the name, but I'm not sure how this helps that...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66176/new/

https://reviews.llvm.org/D66176



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


[PATCH] D63678: Fix test Clang :: Driver/cl-response-file.c for Solaris

2019-06-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added reviewers: ro, rnk, jkorous.
dyung added a project: clang.
Herald added subscribers: dexonsmith, fedor.sergeev.

This is a follow up to D63600  that attempts 
to fix the test to work on all platforms including Windows (which the previous 
patch broke) and Solaris (which is the original motivation for this patch).


https://reviews.llvm.org/D63678

Files:
  clang/test/Driver/cl-response-file.c


Index: clang/test/Driver/cl-response-file.c
===
--- clang/test/Driver/cl-response-file.c
+++ clang/test/Driver/cl-response-file.c
@@ -4,7 +4,7 @@
 
 
 
-// RUN: echo '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
+// RUN: printf '%%s\n' '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
 // RUN: %clang_cl /c -### @%t.rsp -- %s 2>&1 | FileCheck %s
 
 // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"


Index: clang/test/Driver/cl-response-file.c
===
--- clang/test/Driver/cl-response-file.c
+++ clang/test/Driver/cl-response-file.c
@@ -4,7 +4,7 @@
 
 
 
-// RUN: echo '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
+// RUN: printf '%%s\n' '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
 // RUN: %clang_cl /c -### @%t.rsp -- %s 2>&1 | FileCheck %s
 
 // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D63600: [test][Driver] Fix Clang :: Driver/cl-response-file.c

2019-06-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D63600#1554029 , @rnk wrote:

> This causes the test to fail on Windows:
>  http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/7712
>
> There seems to be something wrong with the blamelist, so it didn't send 
> email. I see this in the log from the previous build on that bot:
>
>   Updating llvm to 363241 at ...
>   
>
> But buildbot thinks the previous build was testing r364000, so it didn't send 
> any notifications.
>
> `printf` seems like the wrong command to use to test backslash handling, 
> since it interprets them as escapes. `%S` expands to a path containing 
> backslashes, and the test logs seem consistent with that theory. I'll go 
> ahead and revert this.


i have been working on a fix for this test with Rainer and we think we have one 
that works for both Windows and Solaris, but it still uses printf, although I'm 
not sure I understand your concern with using printf, so I don't know if it 
solves the problem you mention or not. But I have posted it as D63678 
.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63600/new/

https://reviews.llvm.org/D63600



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


[PATCH] D63678: Fix test Clang :: Driver/cl-response-file.c for Solaris

2019-06-24 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL364245: Fix test cl-response-file.c to work on all platforms 
including Windows/Solaris. (authored by dyung, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D63678?vs=206093&id=206311#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63678/new/

https://reviews.llvm.org/D63678

Files:
  cfe/trunk/test/Driver/cl-response-file.c


Index: cfe/trunk/test/Driver/cl-response-file.c
===
--- cfe/trunk/test/Driver/cl-response-file.c
+++ cfe/trunk/test/Driver/cl-response-file.c
@@ -4,7 +4,7 @@
 
 
 
-// RUN: echo '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
+// RUN: printf '%%s\n' '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
 // RUN: %clang_cl /c -### @%t.rsp -- %s 2>&1 | FileCheck %s
 
 // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"


Index: cfe/trunk/test/Driver/cl-response-file.c
===
--- cfe/trunk/test/Driver/cl-response-file.c
+++ cfe/trunk/test/Driver/cl-response-file.c
@@ -4,7 +4,7 @@
 
 
 
-// RUN: echo '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
+// RUN: printf '%%s\n' '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp
 // RUN: %clang_cl /c -### @%t.rsp -- %s 2>&1 | FileCheck %s
 
 // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D55382#1330668 , @anemet wrote:

> Actually this has been failing for 8 hours.  So reverted in r349117.  Also 
> reverted your attempt to update the test.  It wasn't updating the right test: 
> r349118


And I was just about to commit what I think is the work-around for this failure!

Like Adam pointed out, your fix in r349118 was not updating the correct test 
and caused an additional failure.

I was able to get the test passing by adding a flag to suppress the warning 
that you added here. I changed line 54 in test_diagnostics.py to be the 
following:

  def test_diagnostic_range(self):
  tu = get_tu(source='void f() { int i = "a" + 1; }', 
flags=["-Wno-string-plus-int"])# <-- This is line 54 that was changed.
  self.assertEqual(len(tu.diagnostics), 1)

If you apply that fix, the output should be as it originally was and the test 
passes.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55382/new/

https://reviews.llvm.org/D55382



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


[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I have reverted this in r349121 as it has been causing the PS4 bots to be red 
for hours now.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55595/new/

https://reviews.llvm.org/D55595



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


[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked an inline comment as done.
dyung added inline comments.



Comment at: clang-tidy/ClangTidyForceLinker.h:11
+#include "llvm/Support/Compiler.h"
+
+namespace clang {

Is there a reason that this header file does not use the standard header guards?


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55595/new/

https://reviews.llvm.org/D55595



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


[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments.



Comment at: clang-tidy/ClangTidyForceLinker.h:11
+#include "llvm/Support/Compiler.h"
+
+namespace clang {

dyung wrote:
> Is there a reason that this header file does not use the standard header 
> guards?
Sorry, this should not have been marked as done.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55595/new/

https://reviews.llvm.org/D55595



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


[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-09-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung accepted this revision.
dyung added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66176/new/

https://reviews.llvm.org/D66176



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


[PATCH] D76801: [AST] Print a> without extra spaces in C++11 or later.

2020-05-25 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, we noticed an issue with the GDB test suite that was bisected back to this 
change and I have put the details in PR46052. Can you take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76801/new/

https://reviews.llvm.org/D76801



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


[PATCH] D80931: AMDGPU: Fix clang side null pointer value for private

2020-06-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Matt, this change to the test was causing a failure in the upstream PS4 linux 
bot here: 
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/68593

I put in a fix for the test to unbreak the bot in 
086be9fb20489540e6228a6d9eb4afad533202fa 
 that I 
hope is correct, but please feel free to fix it up if it is not.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80931/new/

https://reviews.llvm.org/D80931



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


[PATCH] D80966: [codeview] Put !heapallocsite on calls to operator new

2020-06-06 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I've reverted this change in g059ba74bb6f6166ca7c1783ef81dd37a5209b758 to get 
the bots green again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80966/new/

https://reviews.llvm.org/D80966



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


[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-22 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, this change that you submitted in commit 
5daa25fd7a184524759b6ad065a8bd7e95aa149a 
 seems to 
be causing the test "Clang-Unit :: 
Format/./FormatTests.exe/FormatTest.ConfigurableUseOfTab" to randomly fail 
about 50% of the time on Windows.

Take the most recent 5 runs of the 
llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast buildbot. Builds #31973 
,
 31975 

 and 31976 

 all failed because of that test failing.

On my local Windows computer, if I build your commit and run the FormatTest 
unit test multiple times (the same binary without changing anything or 
rebuilding), that above test fails roughly 50% of the time.

Can you take a look to figure out why your change might be causing this 
instability?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D50078/new/

https://reviews.llvm.org/D50078



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


[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-04-23 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D50078#1999183 , @Typz wrote:

> In D50078#1998578 , @hokein wrote:
>
> > In D50078#1998520 , @Typz wrote:
> >
> > > In D50078#1998398 , @dyung wrote:
> > >
> > > > Hi, this change that you submitted in commit 
> > > > 5daa25fd7a184524759b6ad065a8bd7e95aa149a 
> > > >  
> > > > seems to be causing the test "Clang-Unit :: 
> > > > Format/./FormatTests.exe/FormatTest.ConfigurableUseOfTab" to randomly 
> > > > fail about 50% of the time on Windows.
> > > >
> > > > Take the most recent 5 runs of the 
> > > > llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast buildbot. Builds 
> > > > #31973 
> > > > ,
> > > >  31975 
> > > > 
> > > >  and 31976 
> > > > 
> > > >  all failed because of that test failing.
> > > >
> > > > On my local Windows computer, if I build your commit and run the 
> > > > FormatTest unit test multiple times (the same binary without changing 
> > > > anything or rebuilding), that above test fails roughly 50% of the time.
> > > >
> > > > Can you take a look to figure out why your change might be causing this 
> > > > instability?
> > >
> > >
> > > Hi,
> > >  That is very strange indeed, nothing is supposed to be random here...
> > >  I will try to have a look, but I don't have a windows computer to test, 
> > > and never seen this issue on linux/macos :-/
> >
> >
> > The linux (s390x arch) buildbot is also failing, 
> > http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/31811/steps/ninja%20check%201/logs/stdio.
> >  I reverted it in 47ef09e4848a970c530928496b54085cfdba5a76 
> >  to 
> > make buildbot happy.
>
>
> Unfortunately I don't have access to either an s390x or a windows machine; is 
> there a way to trigger a "private" build on buildbot, to use the same 
> setup/build env ?
>  Or some other way to quickly get the required build env?
>
> (Otherwise, could you please check if adding initialization of 
> ConditionalsLevel to 0 in  constructor of WhitespaceManager::Change class 
> (WhitespaceManager.cpp:43).cpp fixes the issue ?)


I tried adding the fix you suggested to WhitespaceManager.cpp, and 
unfortunately it does not seem to fix the problem. The test still failed 5/10 
times on my machine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D50078/new/

https://reviews.llvm.org/D50078



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


[PATCH] D79194: Add header guards for header files that should not be included on the PS4 platform

2020-04-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added a reviewer: craig.topper.
dyung added a project: clang.

For the PS4 platform, we want to exclude certain headers from being included 
because we do not support the features they provide. To achieve this, we do not 
include any header files by default, and rely on the cpu target features to 
selectively enable supported header files. Compilers targeting the PS4 define 
__SCE__ and individual features will be set automatically by the compiler's 
-target-cpu option (btver2 for the PS4).

The test change is needed because with this change, the test was failing 
because our __SCE__ define was excluding everything, and there is no 
corresponding -target-cpu specified by the test to turn individual features 
back on. When no -target-cpu is selected, a generic cpu is assumed by the 
compiler with no additional feature support enabled. The fix I am adding is 
explicitly running each command with both 32/64bit generic triples.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79194

Files:
  clang/lib/Headers/bmiintrin.h
  clang/lib/Headers/immintrin.h
  clang/lib/Headers/x86intrin.h
  clang/test/Headers/x86intrin-2.c

Index: clang/test/Headers/x86intrin-2.c
===
--- clang/test/Headers/x86intrin-2.c
+++ clang/test/Headers/x86intrin-2.c
@@ -1,10 +1,12 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// REQUIRES: x86-registered-target
 // expected-no-diagnostics
 
-#if defined(i386) || defined(__x86_64__)
-
 // Include the metaheader that includes all x86 intrinsic headers.
 #include 
 
@@ -133,5 +135,3 @@
 int __attribute__((__target__("rtm"))) xtest_wrap(void) {
   return _xtest();
 }
-
-#endif
Index: clang/lib/Headers/x86intrin.h
===
--- clang/lib/Headers/x86intrin.h
+++ clang/lib/Headers/x86intrin.h
@@ -14,39 +14,48 @@
 
 #include 
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__3dNOW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__PRFCHW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE4A__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__FMA4__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__XOP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__TBM__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__LWP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__MWAITX__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__CLZERO__)
 #include 
 #endif
 
Index: clang/lib/Headers/immintrin.h
===
--- clang/lib/Headers/immintrin.h
+++ clang/lib/Headers/immintrin.h
@@ -10,198 +10,231 @@
 #ifndef __IMMINTRIN_H
 #define __IMMINTRIN_H
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modu

[PATCH] D79194: Add header guards for header files that should not be included on the PS4 platform

2020-04-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments.



Comment at: clang/test/Headers/x86intrin-2.c:3
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding 
-Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding 
-flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding 
-flax-vector-conversions=none -Wcast-qual %s -verify

craig.topper wrote:
> I'm not sure why we need a version with and without 
> -flax-vector-conversions=none. "none" is the strictest setting I think. So if 
> we pass with that why do we need to check without it?
I'm not sure, I didn't add that test, I only took the existing RUN lines and 
duplicated each to run with an i386/x86-64 generic triple.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79194/new/

https://reviews.llvm.org/D79194



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


[PATCH] D79194: Add header guards for header files that should not be included on the PS4 platform

2020-04-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung updated this revision to Diff 261385.
dyung added a comment.

Removed REQUIRES line in test since it is not needed


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79194/new/

https://reviews.llvm.org/D79194

Files:
  clang/lib/Headers/bmiintrin.h
  clang/lib/Headers/immintrin.h
  clang/lib/Headers/x86intrin.h
  clang/test/Headers/x86intrin-2.c

Index: clang/test/Headers/x86intrin-2.c
===
--- clang/test/Headers/x86intrin-2.c
+++ clang/test/Headers/x86intrin-2.c
@@ -1,10 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
 // expected-no-diagnostics
 
-#if defined(i386) || defined(__x86_64__)
-
 // Include the metaheader that includes all x86 intrinsic headers.
 #include 
 
@@ -133,5 +134,3 @@
 int __attribute__((__target__("rtm"))) xtest_wrap(void) {
   return _xtest();
 }
-
-#endif
Index: clang/lib/Headers/x86intrin.h
===
--- clang/lib/Headers/x86intrin.h
+++ clang/lib/Headers/x86intrin.h
@@ -14,39 +14,48 @@
 
 #include 
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__3dNOW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__PRFCHW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE4A__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__FMA4__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__XOP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__TBM__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__LWP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__MWAITX__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__CLZERO__)
 #include 
 #endif
 
Index: clang/lib/Headers/immintrin.h
===
--- clang/lib/Headers/immintrin.h
+++ clang/lib/Headers/immintrin.h
@@ -10,198 +10,231 @@
 #ifndef __IMMINTRIN_H
 #define __IMMINTRIN_H
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__MMX__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE2__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE2__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE3__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE3__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSSE3__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSSE3__)
 #include 
 #endif
 
-#if !defined(_

[PATCH] D79194: Add header guards for header files that should not be included on the PS4 platform

2020-04-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung marked 2 inline comments as done.
dyung added inline comments.



Comment at: clang/test/Headers/x86intrin-2.c:7
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding 
-Wcast-qual -x c++ %s -verify
+// REQUIRES: x86-registered-target
 // expected-no-diagnostics

craig.topper wrote:
> We don't need the x86-registered-target if we're not running IR passes do we?
You're right, it isn't needed. I've removed it in the new revision that I'll 
submit. Thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79194/new/

https://reviews.llvm.org/D79194



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


[PATCH] D79194: Add header guards for header files that should not be included on the PS4 platform

2020-04-30 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
dyung marked an inline comment as done.
Closed by commit rG046130490f23: Add header guards for header files that should 
not be included on the PS4… (authored by dyung).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79194/new/

https://reviews.llvm.org/D79194

Files:
  clang/lib/Headers/bmiintrin.h
  clang/lib/Headers/immintrin.h
  clang/lib/Headers/x86intrin.h
  clang/test/Headers/x86intrin-2.c

Index: clang/test/Headers/x86intrin-2.c
===
--- clang/test/Headers/x86intrin-2.c
+++ clang/test/Headers/x86intrin-2.c
@@ -1,10 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -flax-vector-conversions=none -Wcast-qual %s -verify
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -ffreestanding -Wcast-qual -x c++ %s -verify
 // expected-no-diagnostics
 
-#if defined(i386) || defined(__x86_64__)
-
 // Include the metaheader that includes all x86 intrinsic headers.
 #include 
 
@@ -133,5 +134,3 @@
 int __attribute__((__target__("rtm"))) xtest_wrap(void) {
   return _xtest();
 }
-
-#endif
Index: clang/lib/Headers/x86intrin.h
===
--- clang/lib/Headers/x86intrin.h
+++ clang/lib/Headers/x86intrin.h
@@ -14,39 +14,48 @@
 
 #include 
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__3dNOW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__PRFCHW__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE4A__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__FMA4__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__XOP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__TBM__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__LWP__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__MWAITX__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__CLZERO__)
 #include 
 #endif
 
Index: clang/lib/Headers/immintrin.h
===
--- clang/lib/Headers/immintrin.h
+++ clang/lib/Headers/immintrin.h
@@ -10,198 +10,231 @@
 #ifndef __IMMINTRIN_H
 #define __IMMINTRIN_H
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__MMX__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE2__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE2__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE3__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||  \
+defined(__SSE3__)
 #include 
 #endif
 
-#if !defined(_MSC_VER) || __has_feature(modules) || 

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

The test you added is failing on the PS4 linux bot because the PS4 platform 
requires an external linker that isn't present. Is linking necessary for your 
test? Or can -S or even -c work instead to accomplish what you are trying to 
test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131469/new/

https://reviews.llvm.org/D131469

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


[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D131469#3768274 , @dongjunduo 
wrote:

> In D131469#3768260 , @dyung wrote:
>
>> The test you added is failing on the PS4 linux bot because the PS4 platform 
>> requires an external linker that isn't present. Is linking necessary for 
>> your test? Or can -S or even -c work instead to accomplish what you are 
>> trying to test?
>
> Yeah the new test case is designed to test the compiling jobs with a linking 
> stage.
>
> Are there any options or measures to avoid this test running on the PS4?

You could mark it as XFAIL: ps4

Your change also seems to have possibly the same issue when run on our PS5 
Windows bot:
https://lab.llvm.org/buildbot/#/builders/216/builds/9260

  $ ":" "RUN: at line 2"
  $ "z:\test\build\bin\clang.exe" "--driver-mode=g++" "-ftime-trace" 
"-ftime-trace-granularity=0" "-o" 
"Z:\test\build\tools\clang\test\Driver\Output/exe/check-time-trace" 
"Z:\test\llvm-project\clang\test\Driver\check-time-trace.cpp"
  # command stderr:
  clang: error: unable to execute command: program not executable
  clang: error: linker command failed with exit code 1 (use -v to see 
invocation)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131469/new/

https://reviews.llvm.org/D131469

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


[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D131469#3768283 , @dongjunduo 
wrote:

> In D131469#3768282 , @dyung wrote:
>
>> In D131469#3768274 , @dongjunduo 
>> wrote:
>>
>>> In D131469#3768260 , @dyung wrote:
>>>
 The test you added is failing on the PS4 linux bot because the PS4 
 platform requires an external linker that isn't present. Is linking 
 necessary for your test? Or can -S or even -c work instead to accomplish 
 what you are trying to test?
>>>
>>> Yeah the new test case is designed to test the compiling jobs with a 
>>> linking stage.
>>>
>>> Are there any options or measures to avoid this test running on the PS4?
>>
>> You could mark it as XFAIL: ps4
>>
>> Your change also seems to have possibly the same issue when run on our PS5 
>> Windows bot:
>> https://lab.llvm.org/buildbot/#/builders/216/builds/9260
>>
>>   $ ":" "RUN: at line 2"
>>   $ "z:\test\build\bin\clang.exe" "--driver-mode=g++" "-ftime-trace" 
>> "-ftime-trace-granularity=0" "-o" 
>> "Z:\test\build\tools\clang\test\Driver\Output/exe/check-time-trace" 
>> "Z:\test\llvm-project\clang\test\Driver\check-time-trace.cpp"
>>   # command stderr:
>>   clang: error: unable to execute command: program not executable
>>   clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>
> How about "**UNSUPPORTED: ps4, ps5**"

That would likely work I think.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131469/new/

https://reviews.llvm.org/D131469

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


[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D131469#3768352 , @steven_wu wrote:

> In D131469#3768308 , @dongjunduo 
> wrote:
>
>> In D131469#3768288 , @dyung wrote:
>>
>>> In D131469#3768283 , @dongjunduo 
>>> wrote:
>>>
 In D131469#3768282 , @dyung 
 wrote:

> In D131469#3768274 , 
> @dongjunduo wrote:
>
>> In D131469#3768260 , @dyung 
>> wrote:
>>
>>> The test you added is failing on the PS4 linux bot because the PS4 
>>> platform requires an external linker that isn't present. Is linking 
>>> necessary for your test? Or can -S or even -c work instead to 
>>> accomplish what you are trying to test?
>>
>> Yeah the new test case is designed to test the compiling jobs with a 
>> linking stage.
>>
>> Are there any options or measures to avoid this test running on the PS4?
>
> You could mark it as XFAIL: ps4
>
> Your change also seems to have possibly the same issue when run on our 
> PS5 Windows bot:
> https://lab.llvm.org/buildbot/#/builders/216/builds/9260
>
>   $ ":" "RUN: at line 2"
>   $ "z:\test\build\bin\clang.exe" "--driver-mode=g++" "-ftime-trace" 
> "-ftime-trace-granularity=0" "-o" 
> "Z:\test\build\tools\clang\test\Driver\Output/exe/check-time-trace" 
> "Z:\test\llvm-project\clang\test\Driver\check-time-trace.cpp"
>   # command stderr:
>   clang: error: unable to execute command: program not executable
>   clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)

 How about "**UNSUPPORTED: ps4, ps5**"
>>>
>>> That would likely work I think.
>>
>> Done with the commit 39221ad 
>> .
>
> I don't like how this done. This generally won't work for Darwin platform as 
> well since you don't know where SDK is. Whether you have a linker or not has 
> nothing to do with the host platform, you need to check for if the linker is 
> available.
>
> This is also a regression in test coverage since all the supported tests in 
> lines after you added are no longer executed on the platform you excludes.

Thinking it over, I agree with this.

Historically, tests in clang/llvm do not do linking because it can cause a ton 
of problems (like it seems to be doing). Can you achieve what you are trying to 
test by maybe examining the `-###` output? Or if linking is really required, 
maybe the test-suite would be a better place for this test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131469/new/

https://reviews.llvm.org/D131469

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


[PATCH] D128653: [PowerPC] Fix the check for scalar MASS conversion

2022-07-06 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi @masoud.ataei, the test you added in this commit is failing on the PS4 bot, 
can you take a look?

https://lab.llvm.org/buildbot/#/builders/139/builds/24469

  clang (LLVM option parsing): Unknown command line argument 
'-enable-ppc-gen-scalar-mass'.  Try: 'clang (LLVM option parsing) --help'
  clang (LLVM option parsing): Did you mean '--enable-x86-scalar-amx'?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128653/new/

https://reviews.llvm.org/D128653

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


[PATCH] D129180: [clang][dataflow] Return a solution from the solver when `Constraints` are `Satisfiable`.

2022-07-07 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

This change is causing a build failure on the Windows PS4 bot, can you please 
take a look and revert if you need time to investigate?

https://lab.llvm.org/buildbot/#/builders/216/builds/7026

  FAILED: 
tools/clang/lib/Analysis/FlowSensitive/CMakeFiles/obj.clangAnalysisFlowSensitive.dir/WatchedLiteralsSolver.cpp.obj
 
  
C:\PROGRA~2\MICROS~1\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe
  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE 
-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS 
-D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE 
-D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-Itools\clang\lib\Analysis\FlowSensitive 
-IC:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Analysis\FlowSensitive
 -IC:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\include 
-Itools\clang\include -Iinclude 
-IC:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\llvm\include /DWIN32 
/D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 
-wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 
-wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 
-wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 
-wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2  /EHs-c- /GR- 
-UNDEBUG -std:c++14 /showIncludes 
/Fotools\clang\lib\Analysis\FlowSensitive\CMakeFiles\obj.clangAnalysisFlowSensitive.dir\WatchedLiteralsSolver.cpp.obj
 
/Fdtools\clang\lib\Analysis\FlowSensitive\CMakeFiles\obj.clangAnalysisFlowSensitive.dir\
 /FS -c 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Analysis\FlowSensitive\WatchedLiteralsSolver.cpp
  
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\lib\Analysis\FlowSensitive\WatchedLiteralsSolver.cpp(477):
 error C2429: language feature 'structured bindings' requires compiler flag 
'/std:c++17'


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129180/new/

https://reviews.llvm.org/D129180

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


[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-25 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I've reverted this change in order to get the build bots green again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117522/new/

https://reviews.llvm.org/D117522

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


[PATCH] D122611: [clang][extract-api] Add support for macros

2022-03-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

This change is causing 9 test failures on a buildbot, can you please take a 
look and revert if you need time to investigate?

https://lab.llvm.org/buildbot/#/builders/139/builds/19441


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122611/new/

https://reviews.llvm.org/D122611

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


[PATCH] D121445: [Clang][CSKY] Add the CSKY target and compiler driver

2022-04-05 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, one of the tests you added. csky-toolchain.c seems to be failing on a 
Windows build bot, and from a quick look, it appears to be a path separator 
issue. Can you take a look?

https://lab.llvm.org/buildbot/#/builders/216/builds/2452


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121445/new/

https://reviews.llvm.org/D121445

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


[PATCH] D130414: [pseudo] Reorganize CXX.h enums

2022-07-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi @sammccall, your change seems to be causing a build failure on the PS4 linux 
bot, can you take a look?

https://lab.llvm.org/buildbot/#/builders/139/builds/25678

  FAILED: 
tools/clang/tools/extra/pseudo/gen/CMakeFiles/clang-pseudo-gen.dir/Main.cpp.o 
  CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++ 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/pseudo/gen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/gen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/pseudo/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wmisleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT 
tools/clang/tools/extra/pseudo/gen/CMakeFiles/clang-pseudo-gen.dir/Main.cpp.o 
-MF 
tools/clang/tools/extra/pseudo/gen/CMakeFiles/clang-pseudo-gen.dir/Main.cpp.o.d 
-o 
tools/clang/tools/extra/pseudo/gen/CMakeFiles/clang-pseudo-gen.dir/Main.cpp.o 
-c 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/gen/Main.cpp
  
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/gen/Main.cpp:
 In function ‘std::string 
clang::pseudo::{anonymous}::mangleSymbol(clang::pseudo::SymbolID, const 
clang::pseudo::Grammar&)’:
  
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/gen/Main.cpp:73:50:
 error: expected primary-expression before ‘]’ token
 73 |   static std::string *TokNames = new std::string[]{
|  ^
  
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/pseudo/gen/Main.cpp:77:7:
 error: too many initializers for ‘std::string [1]’ {aka 
‘std::__cxx11::basic_string [1]’}
 77 |   };
|   ^


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130414/new/

https://reviews.llvm.org/D130414

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


[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-07-31 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

The test simple-exception.cpp is failing on the PS5 Windows bot after this 
change. Can you take a look?

I forced a build using the commit prior to yours which passed: 
https://lab.llvm.org/buildbot/#/builders/216/builds/7636
And then I forced a build using your commit, and the test failed: 
https://lab.llvm.org/buildbot/#/builders/216/builds/7637

   TEST 'Clang :: Interpreter/simple-exception.cpp' FAILED 

  Script:
  --
  : 'RUN: at line 4';   cat 
Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp | 
z:\test\build\bin\clang-repl.exe | z:\test\build\bin\filecheck.exe 
Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp
  --
  Exit Code: 1
  Command Output (stdout):
  --
  $ ":" "RUN: at line 4"
  $ "cat" "Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp"
  $ "z:\test\build\bin\clang-repl.exe"
  # command stderr:
  JIT session error: Symbols not found: [ ??_7type_info@@6B@ ]
  error: Failed to materialize symbols: { (main, { _CT??_R0PEAX@88, ?f@@YAHXZ, 
?r1@@3HA, _CTA2PEAD, ??_C@_0BB@DPCIAKEG@Simple?5exception?$AA@, 
??_C@_03OFAPEBGM@?$CFs?6?$AA@, $.incr_module_8.__inits.0, 
?checkException@@YAHXZ, _TIC2PEAD, ??_R0PEAD@8, ??_R0PEAX@8, 
__orc_init_func.incr_module_8, ??_C@_0N@CKKDCGKM@Running?5f?$CI?$CJ?6?$AA@, 
_CT??_R0PEAD@88 }) }
  error: Failed to materialize symbols: { (main, { 
__orc_init_func.incr_module_8 }) }
  $ "z:\test\build\bin\filecheck.exe" 
"Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp"
  # command stderr:
  Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp:10:11: 
error: CHECK: expected string not found in input
  // CHECK: Running f()
^
  :1:1: note: scanning from here
  clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> 
  ^
  :1:11: note: possible intended match here
  clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> 
^
  Input file: 
  Check file: Z:\test\llvm-project\clang\test\Interpreter\simple-exception.cpp
  -dump-input=help explains the following input dump.
  Input was:
  <<
  1: clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> clang-repl> 
clang-repl> clang-repl>  
  check:10'0 
X
 error: no match found
  check:10'1   ?

   possible intended match
  >>
  error: command failed with exit status: 1
  --
  


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130788/new/

https://reviews.llvm.org/D130788

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


[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-07-31 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D130788#3689795 , @sunho wrote:

> The test isn't supposed to be ran on windows -- we don't support exception on 
> windows at all yet. I guess XFAIL: windows-msvc, windows-gnu is not working 
> out.

If you don't want the test run on Windows, I think what you want is probably 
`system-windows` rather than `windows-msvc` and `windows-gnu`. The former will 
mark as XFAIL when it is run on Windows, while the latter will mark as XFAIL 
when the target triple includes those strings.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130788/new/

https://reviews.llvm.org/D130788

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


[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-07-31 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D130788#3689918 , @sunho wrote:

> In D130788#3689820 , @dyung wrote:
>
>> In D130788#3689795 , @sunho wrote:
>>
>>> The test isn't supposed to be ran on windows -- we don't support exception 
>>> on windows at all yet. I guess XFAIL: windows-msvc, windows-gnu is not 
>>> working out.
>>
>> If you don't want the test run on Windows, I think what you want is probably 
>> `system-windows` rather than `windows-msvc` and `windows-gnu`. The former 
>> will mark as XFAIL when it is run on Windows, while the latter will mark as 
>> XFAIL when the target triple includes those strings.
>
> Should have been fixed in 
> https://github.com/llvm/llvm-project/commit/773d51ce3bedd091539aa86a5e5fc15a9174ff7b.
>  Can you check it out?

https://lab.llvm.org/buildbot/#/builders/216/builds/7647

That seems to have worked. Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130788/new/

https://reviews.llvm.org/D130788

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


[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-06 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Your change is causing a build failure on the PS4 linux build bot using GCC 
9.3. Can you take a look?
https://lab.llvm.org/buildbot/#/builders/139/builds/26186

  FAILED: 
tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/obj.clangTidyBugproneModule.dir/SignalHandlerCheck.cpp.o
 
  CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++ 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/clang-tidy/bugprone
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/clang-tidy/bugprone
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/clang-tidy
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wmisleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/obj.clangTidyBugproneModule.dir/SignalHandlerCheck.cpp.o
 -MF 
tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/obj.clangTidyBugproneModule.dir/SignalHandlerCheck.cpp.o.d
 -o 
tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/obj.clangTidyBugproneModule.dir/SignalHandlerCheck.cpp.o
 -c 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp
  
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:17:45:
 error: modification of ‘’ is not a constant expression
 17 | "signal", "abort", "_Exit", "quick_exit"};
| ^
  
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:217:12:
 error: modification of ‘’ is not a constant expression
217 | "write"};
|^


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

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


[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-07 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

We are seeing an additional failure on an internal linux bot due to the change 
to using C++17 by default when using GNU ld:

  [3/7] Generating GwpAsan-x86_64-Test
  FAILED: projects/compiler-rt/lib/gwp_asan/tests/GwpAsan-x86_64-Test 
  cd 
/home/jenkins/j/w/workspace/opensource/opensource_build/build/projects/compiler-rt/lib/gwp_asan/tests
 && /home/jenkins/j/w/workspace/opensource/opensource_build/build/./bin/clang++ 
GwpAsanTestObjects.printf_sanitizer_common.cpp.x86_64.o 
GwpAsanTestObjects.alignment.cpp.x86_64.o 
GwpAsanTestObjects.backtrace.cpp.x86_64.o GwpAsanTestObjects.basic.cpp.x86_64.o 
GwpAsanTestObjects.compression.cpp.x86_64.o 
GwpAsanTestObjects.iterate.cpp.x86_64.o 
GwpAsanTestObjects.crash_handler_api.cpp.x86_64.o 
GwpAsanTestObjects.driver.cpp.x86_64.o 
GwpAsanTestObjects.mutex_test.cpp.x86_64.o 
GwpAsanTestObjects.slot_reuse.cpp.x86_64.o 
GwpAsanTestObjects.thread_contention.cpp.x86_64.o 
GwpAsanTestObjects.harness.cpp.x86_64.o 
GwpAsanTestObjects.enable_disable.cpp.x86_64.o 
GwpAsanTestObjects.late_init.cpp.x86_64.o 
GwpAsanTestObjects.options.cpp.x86_64.o 
GwpAsanTestObjects.gtest-all.cc.x86_64.o 
/home/jenkins/j/w/workspace/opensource/opensource_build/build/projects/compiler-rt/lib/gwp_asan/tests/libRTGwpAsanTest.x86_64.a
 -o 
/home/jenkins/j/w/workspace/opensource/opensource_build/build/projects/compiler-rt/lib/gwp_asan/tests/./GwpAsan-x86_64-Test
 -ldl -lstdc++ --driver-mode=g++ -pthread -m64
  /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
  GwpAsanTestObjects.backtrace.cpp.x86_64.o: in function 
`Backtrace_ExceedsStorableLength_Test::TestBody()':
  backtrace.cpp:(.text+0xce6): undefined reference to 
`gwp_asan::AllocationMetadata::kMaxTraceLengthToCollect'
  clang-16: error: linker command failed with exit code 1 (use -v to see 
invocation)

And it seems at least one buildbot is also hitting the same issue:
https://lab.llvm.org/staging/#/builders/180/builds/7174

  [165/1101] Generating GwpAsan-x86_64-Test
  FAILED: projects/compiler-rt/lib/gwp_asan/tests/GwpAsan-x86_64-Test 
  cd 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/projects/compiler-rt/lib/gwp_asan/tests
 && 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/./bin/clang++
 GwpAsanTestObjects.printf_sanitizer_common.cpp.x86_64.o 
GwpAsanTestObjects.alignment.cpp.x86_64.o 
GwpAsanTestObjects.backtrace.cpp.x86_64.o GwpAsanTestObjects.basic.cpp.x86_64.o 
GwpAsanTestObjects.compression.cpp.x86_64.o 
GwpAsanTestObjects.iterate.cpp.x86_64.o 
GwpAsanTestObjects.crash_handler_api.cpp.x86_64.o 
GwpAsanTestObjects.driver.cpp.x86_64.o 
GwpAsanTestObjects.mutex_test.cpp.x86_64.o 
GwpAsanTestObjects.slot_reuse.cpp.x86_64.o 
GwpAsanTestObjects.thread_contention.cpp.x86_64.o 
GwpAsanTestObjects.harness.cpp.x86_64.o 
GwpAsanTestObjects.enable_disable.cpp.x86_64.o 
GwpAsanTestObjects.late_init.cpp.x86_64.o 
GwpAsanTestObjects.options.cpp.x86_64.o 
GwpAsanTestObjects.gtest-all.cc.x86_64.o 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/projects/compiler-rt/lib/gwp_asan/tests/libRTGwpAsanTest.x86_64.a
 -o 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/projects/compiler-rt/lib/gwp_asan/tests/./GwpAsan-x86_64-Test
 -ldl -lstdc++ --driver-mode=g++ -pthread -m64
  /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: 
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: DWARF 
error: invalid or unhandled FORM value: 0x23
  GwpAsanTestObjects.backtrace.cpp.x86_64.o: in function 
`Backtrace_ExceedsStorableLength_Test::TestBody()':
  backtrace.cpp:(.text+0xca6): undefined reference to 
`gwp_asan::AllocationMetadata::kMaxTraceLengthToCollect'
  clang-16: error: linker command failed with exit code 1 (use -v to see 
invocation)

Switching between BFD ld and gold still fails (although gold fails for a 
slightly different reason). Superficially it seems that switching to C++17 for 
some reason might be causing the compiler to emit debug info that these older 
non-lld linkers cannot understand for some reason?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

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


[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, the test you added is failing on the PS4 Windows bot 
https://lab.llvm.org/buildbot/#/builders/216/builds/2647.

Can you take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121556/new/

https://reviews.llvm.org/D121556

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


[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-03 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, your change is causing a test failure in the test attr-trivial-abi.cpp that 
you modified on the PS4 Windows box:

https://lab.llvm.org/staging/#/builders/204/builds/758/steps/7/logs/FAIL__Clang__attr-trivial-abi_cpp

   TEST 'Clang :: SemaCXX/attr-trivial-abi.cpp' FAILED 

  Script:
  --
  : 'RUN: at line 1';   
c:\buildbot-root\llvm-clang-x86_64-sie-win\build\bin\clang.exe -cc1 
-internal-isystem 
c:\buildbot-root\llvm-clang-x86_64-sie-win\build\lib\clang\15.0.0\include 
-nostdsysteminc -fsyntax-only -verify 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp
 -std=c++11
  --
  Exit Code: 1
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "c:\buildbot-root\llvm-clang-x86_64-sie-win\build\bin\clang.exe" "-cc1" 
"-internal-isystem" 
"c:\buildbot-root\llvm-clang-x86_64-sie-win\build\lib\clang\15.0.0\include" 
"-nostdsysteminc" "-fsyntax-only" "-verify" 
"C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp"
 "-std=c++11"
  # command stderr:
  error: 'error' diagnostics seen but not expected: 
File 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp
 Line 42: static_assert failed due to requirement 
'!__is_trivially_relocatable(S3_3)' ""
File 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp
 Line 114: static_assert failed due to requirement 
'!__is_trivially_relocatable(deletedCopyMoveConstructor::CopyMoveDeleted)' ""
File 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp
 Line 119: static_assert failed due to requirement 
'!__is_trivially_relocatable(deletedCopyMoveConstructor::S18)' ""
File 
C:\buildbot-root\llvm-clang-x86_64-sie-win\llvm-project\clang\test\SemaCXX\attr-trivial-abi.cpp
 Line 141: static_assert failed due to requirement 
'!__is_trivially_relocatable(deletedCopyMoveConstructor::S19)' ""
  4 errors generated.
  error: command failed with exit status: 1
  --
  

Can you take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114732/new/

https://reviews.llvm.org/D114732

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


[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-03 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D114732#3294794 , 
@devin.jeanpierre wrote:

> Oops, sorry about that. What is the correct way to test/reproduce the change? 
> Do I / can I submit builds to the buildbot manually for testing?
>
> Also, should I be rolling back this change, or no? Not sure of the protocol 
> here, this is my first change to Clang.
>
> P.S. that breakage is disturbing -- I would not have expected this sort of 
> failure on any platform, and I'm not sure if it reflects a bug on PS4. (It 
> seems to be that structs are passed in registers, even if the member 
> variables of that struct cannot be.)

Reproducing it should be as simple as just rerunning the test with the PS4 
triple, x86_64-scei-ps4 and comparing that output with what is expected. If it 
helps, I noticed that it seems to reproduce on both linux/windows.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114732/new/

https://reviews.llvm.org/D114732

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


[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-11 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I'm not exactly sure why, but this change seems to be causing the 
Driver/cl-options.c test to fail on the PS4 Windows bot:

https://lab.llvm.org/staging/#/builders/204/builds/1343

It was also failing previously after the original commit until it was reverted 
at which point it started to pass again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118070/new/

https://reviews.llvm.org/D118070

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


[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-11 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I've reverted this and the follow-up change to fix the build in 
437d4e01fe4c057509dff30efd560049ad07bc99 
.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118070/new/

https://reviews.llvm.org/D118070

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


[PATCH] D119207: [CUDA][SPIRV] Assign global address space to CUDA kernel arguments

2022-02-17 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, the test you added is failing on the PS4 Linux bot, can you take a look?

https://lab.llvm.org/buildbot/#/builders/139/builds/17199


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119207/new/

https://reviews.llvm.org/D119207

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


[PATCH] D119207: [CUDA][SPIRV] Assign global address space to CUDA kernel arguments

2022-02-17 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D119207#3330494 , @shangwuyao 
wrote:

> In D119207#3330385 , @dyung wrote:
>
>> Hi, the test you added is failing on the PS4 Linux bot, can you take a look?
>>
>> https://lab.llvm.org/buildbot/#/builders/139/builds/17199
>
> Looks like the compiled SPIR-V is slightly different for different build 
> settings, for `llvm-clang-x86_64-sie-ubuntu-fast`, it is compiled to
>
>   define hidden spir_kernel void @_Z6kernelPi(i32 addrspace(1)* noundef 
> %output.coerce) #0 { 
>
> so it is missing that extra `hidden` keyword. 
> And for `clang-ve-ninja`, it is compiled to
>
>   define spir_kernel void @_Z6kernelPi(i32 addrspace(1)* noundef %0) #0 { 
>
> so the kernel argument identifier is slightly different (`%0` vs 
> `%output.coerce`).
>
> I could fix that, I wonder why it didn't trigger the same issue (for the 
> `hidden` keyword) with this test 
> 
>  tho, it is basically the same.
>
> And why does those build test run only after merging? For future reference, 
> can I try to run those myself before submitting?

These are build bots that run builds when new commits are detected. That's how 
they work. There is some pre-commit testing, but I'm not sure how that works 
exactly.

You can run these builds yourself before submitting, just extract the cmake 
command from the job and then run the build/test the normal way. If you need 
help reproducing a bot failure, an email to the bot owner can help you if you 
have trouble reproducing a failure.

> For this change, should we do a rollback and then re-land it after applying 
> the fix?

If you can fix it soon, a quick fix is fine. If you need time to investigate, a 
revert would be best until you can fix it so that the bot does not keep failing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119207/new/

https://reviews.llvm.org/D119207

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


[PATCH] D114115: [Driver] Support for compressed debug info on Fuchsia

2022-04-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I think the problem here is that if zlib is not available, you won't get the 
clang command line you expect:

https://lab.llvm.org/buildbot/#/builders/216/builds/3519

  Input was:
  <<
   1: clang version 15.0.0 
(https://github.com/llvm/llvm-project.git 
2d0c897212d0551966b26eae986209ea31c4f032) 
   2: Target: x86_64-unknown-fuchsia 
   3: Thread model: posix 
   4: InstalledDir: 
c:\buildbot-root\llvm-clang-x86_64-sie-win\build\bin 
   5: clang: warning: cannot compress debug sections (zlib not 
installed) [-Wdebug-compression-unavailable] 
   6:  
"c:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\bin\\clang.exe" "-cc1" 
"-triple" "x86_64-unknown-fuchsia" "-emit-obj" "--mrelax-relocations" 
"-disable-free" "-clear-ast-before-backend" "-main-file-name" "fuchsia.c" 
"-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" 
"-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" 
"-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-mllvm" 
"-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" 
"-fcoverage-compilation-dir=C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver"
 "-resource-dir" 
"c:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\15.0.0" 
"-isysroot" 
"C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver/platform"
 "-internal-isystem" 
"c:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\15.0.0\\include"
 "-internal-externc-isystem" 
"C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver/platform\\include"
 "-Og" 
"-fdebug-compilation-dir=C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver"
 "-ferror-limit" "19" "-fsanitize=safe-stack" "-stack-protector" "2" 
"-fgnuc-version=4.2.1" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" 
"C:\\Users\\BUILDB~1\\AppData\\Local\\Temp\\lit-tmp-f3r87ykv\\fuchsia-9a49da.o" 
"-x" "c" 
"C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver\\fuchsia.c"
 
   7:  
"c:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\bin\\ld.lld" "-z" 
"max-page-size=4096" "-z" "now" "-z" "rodynamic" "-z" 
"separate-loadable-segments" "-z" "rel" "--pack-dyn-relocs=relr" 
"--sysroot=C:\\buildbot-root\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver/platform"
 "-pie" "--build-id" "--hash-style=gnu" "--eh-frame-hdr" "-dynamic-linker" 
"ld.so.1" "-o" "a.out" "Scrt1.o" 
"-LC:\\buildbot-root\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver/platform\\lib"
 "--compress-debug-sections=zlib" 
"C:\\Users\\BUILDB~1\\AppData\\Local\\Temp\\lit-tmp-f3r87ykv\\fuchsia-9a49da.o" 
"c:\\buildbot-root\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\15.0.0\\lib\\fuchsia\\libclang_rt.builtins-x86_64.a"
 "-lc" 
  >>

Since lld does produce the expected argument, it suggests that maybe LLD isn't 
doing any detection of whether zlib is available like the compiler is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114115/new/

https://reviews.llvm.org/D114115

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


[PATCH] D123273: [utils] Avoid hardcoding metadata ids in update_cc_test_checks

2022-05-10 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi @jkorous, 4 of the tests you added seem to be failing on the PS4 linux and 
Window buildbots, can you take a look, and revert if it might take a while to 
investigate?

https://lab.llvm.org/buildbot/#/builders/139/builds/21573
https://lab.llvm.org/buildbot/#/builders/216/builds/4167


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123273/new/

https://reviews.llvm.org/D123273

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


[PATCH] D64931: Change X86 datalayout for three address spaces that specify pointer sizes.

2019-08-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, this is causing 3 test failures on the PS4 linux bot. The changes may not 
have been initially flagged because a different issue was causing a build 
failure which masked the problem. I have bisected the test failures to this 
change though.

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/53916

LLVM :: LTO/Resolution/X86/not-prevailing-weak-aliasee.ll
LLVM :: ThinLTO/X86/printer.ll
lld :: ELF/lto/drop-debug-info.ll

Can you take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64931/new/

https://reviews.llvm.org/D64931



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


[PATCH] D64931: Change X86 datalayout for three address spaces that specify pointer sizes.

2019-08-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

In D64931#1647880 , @dyung wrote:

> Hi, this is causing 3 test failures on the PS4 linux bot. The changes may not 
> have been initially flagged because a different issue was causing a build 
> failure which masked the problem. I have bisected the test failures to this 
> change though.
>
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/53916
>
> LLVM :: LTO/Resolution/X86/not-prevailing-weak-aliasee.ll
>  LLVM :: ThinLTO/X86/printer.ll
>  lld :: ELF/lto/drop-debug-info.ll


Actually it appears the llvm tests were fixed up in r370105 leaving only the 
LLD test failing.

> Can you take a look?




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64931/new/

https://reviews.llvm.org/D64931



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


[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-08-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, we are seeing this test fail on our internal linux build bot. I built/ran 
your latest change r310537 and here is the test result:

  
/home/dyung/src/upstream/llvm_clean/tools/clang/test/Driver/openmp-offload.c:722:23:
 error: expected string not found in input  
  
  // CHK-PTXAS-VERSION: clang{{.*}}.bc" {{.*}}"-target-feature" "+ptx52"
   
^   
   
  :1:1: note: scanning from here 
   
  clang version 6.0.0 (trunk 310537)
   
  ^ 
   
  :9:114: note: possible intended match here 
   
   "nvlink" "-o" "/tmp/lit_tmp_FMSP4Q/openmp-offload-bb8c5f.out" "-arch" 
"sm_20" "-L/home/dyung/src/upstream/310537-linux/./lib" "-lomptarget-nvptx" 
"openmp-offload-74c18d.cubin"   
   

Executing the run line from line 719 of the file at r310537 produces the 
following output:

  dyung@Spica:~/src/upstream/llvm_clean/tools/clang/test/Driver$ 
/home/dyung/src/upstream/310537-linux/./bin/clang  -### -no-canonical-prefixes 
-fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --fopenmp-ptx=+ptx52 
~/src/upstream/llvm_clean/tools/clang/test/Driver/openmp-offload.c 2>&1 
   
  clang version 6.0.0 (trunk 310537)
   
  Target: x86_64-unknown-linux-gnu  
   
  Thread model: posix   
   
  InstalledDir: /home/dyung/src/upstream/310537-linux/./bin 
   
  clang: error: cannot find libdevice for sm_20. Provide path to different CUDA 
installation via --cuda-path, or pass -nocudalib to build without linking with 
libdevice.   
  
   "/home/dyung/src/upstream/310537-linux/./bin/clang" "-cc1" "-triple" 
"x86_64-unknown-linux-gnu" "-emit-llvm-bc" "-emit-llvm-uselists" 
"-disable-free" "-main-file-name" "openmp-offload.c" "-mrelocation-model" 
"static" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" 
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" 
"-target-cpu" "x86-64" "-dwarf-column-info" "-debugger-tuning=gdb" 
"-resource-dir" "/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0" 
"-internal-isystem" "/usr/local/include" "-internal-isystem" 
"/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0/include" 
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" 
"-internal-externc-isystem" "/include" "-internal-externc-isystem" 
"/usr/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" 
"/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0/include" 
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" 
"-internal-externc-isystem" "/include" "-internal-externc-isystem" 
"/usr/include" "-fdebug-compilation-dir" 
"/home/dyung/src/upstream/llvm_clean/tools/clang/test/Driver" "-ferror-limit" 
"19" "-fmessage-length" "117" "-fopenmp" "-fobjc-runtime=gcc" 
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-o" 
"/tmp/openmp-offload-e58520.bc" "-x" "c" 
"/home/dyung/src/upstream/llvm_clean/tools/clang/test/Driver/openmp-offload.c" 
"-fopenmp-targets=nvptx64-nvidia-cuda"  
  
  
   "/home/dyung/src/upstream/310537-linux/./bin/clang" "-cc1" "-triple" 
"nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu" "-S" 
"-disable-free" "-main-file-name" "openmp-offload.c" "-mrelocation-model" "pic" 
"-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" 
"-no-integrated-as" "-fuse-init-array" "-target-cpu" "sm_20" 
"-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir" 
"/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0" "-internal-isystem" 
"/usr/local/include" "-internal-isystem" 
"/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0/include" 
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" 
"-internal-externc-isystem" "/include" "-internal-externc-isystem" 
"/usr/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" 
"/home/dyung/src/upstream/310537-linux/./lib/clang/6.0.0/include" 
"-internal-externc-isystem" "/usr/i

[PATCH] D86965: Do not emit "-tune-cpu generic" for PS4 platform

2020-09-01 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added a reviewer: probinson.
dyung added a project: clang.
dyung requested review of this revision.

For the PS4, do not emit "-tune-cpu generic" since the platform only has 1 
known CPU and we do not want to prevent optimizations by tuning for a generic 
rather than the specific processor it contains.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86965

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/ps4-cpu-defaults.cpp


Index: clang/test/Driver/ps4-cpu-defaults.cpp
===
--- clang/test/Driver/ps4-cpu-defaults.cpp
+++ clang/test/Driver/ps4-cpu-defaults.cpp
@@ -1,6 +1,7 @@
 // Check that on the PS4 we default to:
-// -target-cpu btver2 and no exceptions
+// -target-cpu btver2, no exceptions and not -tune-cpu generic
 
 // RUN: %clang -target x86_64-scei-ps4 -c %s -### 2>&1 | FileCheck %s
 // CHECK: "-target-cpu" "btver2"
 // CHECK-NOT: exceptions
+// CHECK-NOT: "-tune-cpu" "generic"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2075,9 +2075,10 @@
 
   // Handle -mtune.
 
-  // Default to "generic" unless -march is present.
+  // Default to "generic" unless -march is present or targetting the PS4
   std::string TuneCPU;
-  if (!Args.hasArg(clang::driver::options::OPT_march_EQ))
+  if (!Args.hasArg(clang::driver::options::OPT_march_EQ) &&
+  !getToolChain().getTriple().isPS4CPU())
 TuneCPU = "generic";
 
   // Override based on -mtune.


Index: clang/test/Driver/ps4-cpu-defaults.cpp
===
--- clang/test/Driver/ps4-cpu-defaults.cpp
+++ clang/test/Driver/ps4-cpu-defaults.cpp
@@ -1,6 +1,7 @@
 // Check that on the PS4 we default to:
-// -target-cpu btver2 and no exceptions
+// -target-cpu btver2, no exceptions and not -tune-cpu generic
 
 // RUN: %clang -target x86_64-scei-ps4 -c %s -### 2>&1 | FileCheck %s
 // CHECK: "-target-cpu" "btver2"
 // CHECK-NOT: exceptions
+// CHECK-NOT: "-tune-cpu" "generic"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2075,9 +2075,10 @@
 
   // Handle -mtune.
 
-  // Default to "generic" unless -march is present.
+  // Default to "generic" unless -march is present or targetting the PS4
   std::string TuneCPU;
-  if (!Args.hasArg(clang::driver::options::OPT_march_EQ))
+  if (!Args.hasArg(clang::driver::options::OPT_march_EQ) &&
+  !getToolChain().getTriple().isPS4CPU())
 TuneCPU = "generic";
 
   // Override based on -mtune.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D86965: Do not emit "-tune-cpu generic" for PS4 platform

2020-09-01 Thread Douglas Yung via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb1f394862053: Do not emit "-tune-cpu generic" for 
PS4 platform (authored by dyung).

Changed prior to commit:
  https://reviews.llvm.org/D86965?vs=289239&id=289253#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86965/new/

https://reviews.llvm.org/D86965

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/ps4-cpu-defaults.cpp


Index: clang/test/Driver/ps4-cpu-defaults.cpp
===
--- clang/test/Driver/ps4-cpu-defaults.cpp
+++ clang/test/Driver/ps4-cpu-defaults.cpp
@@ -1,6 +1,7 @@
 // Check that on the PS4 we default to:
-// -target-cpu btver2 and no exceptions
+// -target-cpu btver2, no exceptions and not -tune-cpu generic
 
 // RUN: %clang -target x86_64-scei-ps4 -c %s -### 2>&1 | FileCheck %s
 // CHECK: "-target-cpu" "btver2"
 // CHECK-NOT: exceptions
+// CHECK-NOT: "-tune-cpu"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2075,9 +2075,10 @@
 
   // Handle -mtune.
 
-  // Default to "generic" unless -march is present.
+  // Default to "generic" unless -march is present or targetting the PS4.
   std::string TuneCPU;
-  if (!Args.hasArg(clang::driver::options::OPT_march_EQ))
+  if (!Args.hasArg(clang::driver::options::OPT_march_EQ) &&
+  !getToolChain().getTriple().isPS4CPU())
 TuneCPU = "generic";
 
   // Override based on -mtune.


Index: clang/test/Driver/ps4-cpu-defaults.cpp
===
--- clang/test/Driver/ps4-cpu-defaults.cpp
+++ clang/test/Driver/ps4-cpu-defaults.cpp
@@ -1,6 +1,7 @@
 // Check that on the PS4 we default to:
-// -target-cpu btver2 and no exceptions
+// -target-cpu btver2, no exceptions and not -tune-cpu generic
 
 // RUN: %clang -target x86_64-scei-ps4 -c %s -### 2>&1 | FileCheck %s
 // CHECK: "-target-cpu" "btver2"
 // CHECK-NOT: exceptions
+// CHECK-NOT: "-tune-cpu"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2075,9 +2075,10 @@
 
   // Handle -mtune.
 
-  // Default to "generic" unless -march is present.
+  // Default to "generic" unless -march is present or targetting the PS4.
   std::string TuneCPU;
-  if (!Args.hasArg(clang::driver::options::OPT_march_EQ))
+  if (!Args.hasArg(clang::driver::options::OPT_march_EQ) &&
+  !getToolChain().getTriple().isPS4CPU())
 TuneCPU = "generic";
 
   // Override based on -mtune.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D86290: Move all fields of '-cc1' option related classes into def file databases

2020-09-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I have reverted this change in 8d2d0e84857cb1f2d01456eb433b5172d3a0772b 
 to get 
the build bots green again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86290/new/

https://reviews.llvm.org/D86290

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


[PATCH] D78699: [X86] Passing union type through register.

2020-10-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, the test you added seems to pass both before and after your change, is this 
intended?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78699/new/

https://reviews.llvm.org/D78699

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


[PATCH] D78699: [X86] Passing union type through register.

2020-10-13 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments.



Comment at: clang/test/CodeGen/X86/avx-union.c:2
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx -emit-llvm -o %t %s || FileCheck < %t %s --check-prefix=CHECK, AVX
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -emit-llvm -o %t %s || FileCheck < %t %s --check-prefix=CHECK, AVX512
+// This tests verifies that a union parameter should pass by a vector 
regitster whose first eightbyte is SSE and the other eightbytes are SSEUP.

These RUN lines have 2 issues, you are using "||" instead of "|" and each check 
prefix must have its own argument, so you need "--check-prefix=CHECK 
--check-prefix=AVX".



Comment at: clang/test/CodeGen/X86/avx-union.c:22
+union M512 m2;
+// CHECK-LABEL: define dso_local void @test()
+// CHECK:   void @foo1(<4 x double>

When I fix the run lines above, I'm not getting "dso_local". Might want to 
double check that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78699/new/

https://reviews.llvm.org/D78699

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


[PATCH] D89747: Add option to use older clang ABI behavior when passing certain union types as function arguments

2020-10-19 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision.
dyung added reviewers: probinson, rsmith, LiuChen3, craig.topper.
dyung added a project: clang.
Herald added subscribers: dexonsmith, pengfei.
dyung requested review of this revision.

Recently commit D78699  (commit 26cfb6e562f1 
), fixed 
clang's behavior with respect to passing a union type through a register to 
correctly follow the ABI. However, this is an ABI breaking change with earlier 
versions of the clang compiler, so we should add an -fclang-abi-compat option 
to address this. Additionally, the PS4 ABI requires the older behavior, so that 
is added as well.

This change adds a Ver11 value to the ClangABI enum that when it is set (or the 
target is the PS4 triple), we skip the ABI fix introduced in D78699 
.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89747

Files:
  clang/include/clang/Basic/LangOptions.h
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/X86/avx-union.c


Index: clang/test/CodeGen/X86/avx-union.c
===
--- clang/test/CodeGen/X86/avx-union.c
+++ clang/test/CodeGen/X86/avx-union.c
@@ -1,5 +1,11 @@
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK 
--check-prefix=AVX512
+
+// Test Clang 11 and earlier behavior
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx -fclang-abi-compat=10.0 -emit-llvm -o - %s | FileCheck %s 
--check-prefix=AVX --check-prefix=CHECK-LEGACY
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -fclang-abi-compat=11.0 -emit-llvm -o - %s | FileCheck %s 
--check-prefix=CHECK-LEGACY --check-prefix=AVX512-LEGACY
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-scei-ps4 -target-feature 
+avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-LEGACY 
--check-prefix=AVX-LEGACY
+
 // This tests verifies that a union parameter should pass by a vector 
regitster whose first eightbyte is SSE and the other eightbytes are SSEUP.
 
 typedef int __m256 __attribute__ ((__vector_size__ (32)));
@@ -19,10 +25,12 @@
 extern void foo2(union M512 A);
 union M256 m1;
 union M512 m2;
-// CHECK-LABEL: define void @test()
-// CHECK:   call void @foo1(<4 x double>
-// AVX: call void @foo2(%union.M512* byval(%union.M512) align 64
-// AVX512:  call void @foo2(<8 x double>
+// CHECK-LABEL:   define void @test()
+// CHECK: call void @foo1(<4 x double>
+// CHECK-LEGACY:  call void @foo1(%union.M256* byval(%union.M256) align 32
+// AVX:   call void @foo2(%union.M512* byval(%union.M512) align 64
+// AVX512:call void @foo2(<8 x double>
+// AVX512-LEGACY: call void @foo2(%union.M512* byval(%union.M512) align 64
 void test() {
   foo1(m1);
   foo2(m2);
Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -3460,6 +3460,8 @@
 Opts.setClangABICompat(LangOptions::ClangABI::Ver7);
   else if (Major <= 9)
 Opts.setClangABICompat(LangOptions::ClangABI::Ver9);
+  else if (Major <= 11)
+Opts.setClangABICompat(LangOptions::ClangABI::Ver11);
 } else if (Ver != "latest") {
   Diags.Report(diag::err_drv_invalid_value)
   << A->getAsString(Args) << A->getValue();
Index: clang/lib/CodeGen/TargetInfo.cpp
===
--- clang/lib/CodeGen/TargetInfo.cpp
+++ clang/lib/CodeGen/TargetInfo.cpp
@@ -3061,7 +3061,11 @@
 
 // Classify the fields one at a time, merging the results.
 unsigned idx = 0;
-bool IsUnion = RT->isUnionType();
+bool UseClang11Compat = getContext().getLangOpts().getClangABICompat() <=
+LangOptions::ClangABI::Ver11 ||
+getContext().getTargetInfo().getTriple().isPS4();
+bool IsUnion = RT->isUnionType() && !UseClang11Compat;
+
 for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
i != e; ++i, ++idx) {
   uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);
Index: clang/include/clang/Basic/LangOptions.h
===
--- clang/include/clang/Basic/LangOptions.h
+++ clang/include/clang/Basic/LangOptions.h
@@ -153,6 +153,11 @@
 /// NetBSD.
 Ver9,
 
+/// Attempt to be ABI-compatible with code generated by Clang 11.0.x
+/// (git  2e10b7a39b93). This causes clang to pass unions with a 256-bit
+   

[PATCH] D89747: Add option to use older clang ABI behavior when passing certain union types as function arguments

2020-10-19 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Sorry for the lack of context, I made my diffs using a new method this time, 
but I'll make sure it has the full context next time. Thanks!




Comment at: clang/test/CodeGen/X86/avx-union.c:7
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -fclang-abi-compat=11.0 -emit-llvm -o - %s | FileCheck %s 
--check-prefix=CHECK-LEGACY --check-prefix=AVX512-LEGACY
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-scei-ps4 -target-feature 
+avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-LEGACY 
--check-prefix=AVX-LEGACY
+

rsmith wrote:
> There are no added `CHECK` lines for `--check-prefix=AVX-LEGACY`. Is that 
> intentional, or is there a `AVX-LEGACY:` line missing from the test below?
It was intentional since the AVX-LEGACY was the same. I debated putting it in 
to make it clearer, but decided to leave it out thinking it might cause more 
confusing to see two identical CHECK lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89747/new/

https://reviews.llvm.org/D89747

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


[PATCH] D89747: Add option to use older clang ABI behavior when passing certain union types as function arguments

2020-10-19 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG774ab60125ee: Add option to use older clang ABI behavior 
when passing certain union types as… (authored by dyung).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89747/new/

https://reviews.llvm.org/D89747

Files:
  clang/include/clang/Basic/LangOptions.h
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/X86/avx-union.c


Index: clang/test/CodeGen/X86/avx-union.c
===
--- clang/test/CodeGen/X86/avx-union.c
+++ clang/test/CodeGen/X86/avx-union.c
@@ -1,5 +1,11 @@
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK 
--check-prefix=AVX512
+
+// Test Clang 11 and earlier behavior
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx -fclang-abi-compat=10.0 -emit-llvm -o - %s | FileCheck %s 
--check-prefix=AVX --check-prefix=CHECK-LEGACY
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature 
+avx512f -fclang-abi-compat=11.0 -emit-llvm -o - %s | FileCheck %s 
--check-prefix=CHECK-LEGACY --check-prefix=AVX512-LEGACY
+// RUN: %clang_cc1 -w -ffreestanding -triple x86_64-scei-ps4 -target-feature 
+avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-LEGACY 
--check-prefix=AVX-LEGACY
+
 // This tests verifies that a union parameter should pass by a vector 
regitster whose first eightbyte is SSE and the other eightbytes are SSEUP.
 
 typedef int __m256 __attribute__ ((__vector_size__ (32)));
@@ -19,10 +25,12 @@
 extern void foo2(union M512 A);
 union M256 m1;
 union M512 m2;
-// CHECK-LABEL: define void @test()
-// CHECK:   call void @foo1(<4 x double>
-// AVX: call void @foo2(%union.M512* byval(%union.M512) align 64
-// AVX512:  call void @foo2(<8 x double>
+// CHECK-LABEL:   define void @test()
+// CHECK: call void @foo1(<4 x double>
+// CHECK-LEGACY:  call void @foo1(%union.M256* byval(%union.M256) align 32
+// AVX:   call void @foo2(%union.M512* byval(%union.M512) align 64
+// AVX512:call void @foo2(<8 x double>
+// AVX512-LEGACY: call void @foo2(%union.M512* byval(%union.M512) align 64
 void test() {
   foo1(m1);
   foo2(m2);
Index: clang/lib/Frontend/CompilerInvocation.cpp
===
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -3460,6 +3460,8 @@
 Opts.setClangABICompat(LangOptions::ClangABI::Ver7);
   else if (Major <= 9)
 Opts.setClangABICompat(LangOptions::ClangABI::Ver9);
+  else if (Major <= 11)
+Opts.setClangABICompat(LangOptions::ClangABI::Ver11);
 } else if (Ver != "latest") {
   Diags.Report(diag::err_drv_invalid_value)
   << A->getAsString(Args) << A->getValue();
Index: clang/lib/CodeGen/TargetInfo.cpp
===
--- clang/lib/CodeGen/TargetInfo.cpp
+++ clang/lib/CodeGen/TargetInfo.cpp
@@ -3061,7 +3061,11 @@
 
 // Classify the fields one at a time, merging the results.
 unsigned idx = 0;
-bool IsUnion = RT->isUnionType();
+bool UseClang11Compat = getContext().getLangOpts().getClangABICompat() <=
+LangOptions::ClangABI::Ver11 ||
+getContext().getTargetInfo().getTriple().isPS4();
+bool IsUnion = RT->isUnionType() && !UseClang11Compat;
+
 for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
i != e; ++i, ++idx) {
   uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);
Index: clang/include/clang/Basic/LangOptions.h
===
--- clang/include/clang/Basic/LangOptions.h
+++ clang/include/clang/Basic/LangOptions.h
@@ -153,6 +153,11 @@
 /// NetBSD.
 Ver9,
 
+/// Attempt to be ABI-compatible with code generated by Clang 11.0.x
+/// (git  2e10b7a39b93). This causes clang to pass unions with a 256-bit
+/// vector member on the stack instead of using registers.
+Ver11,
+
 /// Conform to the underlying platform's C and C++ ABIs as closely
 /// as we can.
 Latest


Index: clang/test/CodeGen/X86/avx-union.c
===
--- clang/test/CodeGen/X86/avx-union.c
+++ clang/test/CodeGen/X86/avx-union.c
@@ -1,5 +1,11 @@
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-feature +avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
 // RUN: %clang_cc1 -w -ffreestanding -triple x86_64-linux-gnu -target-featu

[PATCH] D102489: [Clang,Driver] Add -fveclib=Darwin_libsystem_m support.

2021-05-14 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

The test added in this commit was failing on the PS4 bot 
(https://lab.llvm.org/buildbot/#/builders/139/builds/4059). I've reverted the 
change in 59b419adc6e608db8d7c31efcc37f34c0b57b7d0 
 to get 
the bot green again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102489/new/

https://reviews.llvm.org/D102489

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


[PATCH] D95660: [NFC] Disallow unused prefixes under clang/test/Driver

2021-01-29 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

PS4 changes lgtm.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95660/new/

https://reviews.llvm.org/D95660

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


[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-29 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, our internal testing started to hit an assertion failure in one of our 
tests after this commit. I have put the details in PR52011, can you please take 
a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109607/new/

https://reviews.llvm.org/D109607

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


[PATCH] D110783: [clang] Make crash reproducer work with clang-cl

2021-09-30 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi, the test you modified Driver/crash-report.cpp is failing on the PS4 bot 
after your change. Can you take a look?

https://lab.llvm.org/buildbot/#/builders/139/builds/10939


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110783/new/

https://reviews.llvm.org/D110783

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


[PATCH] D95915: [clang][driver] Only warn once about invalid -stdlib value

2021-02-09 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

It also failed on the PS4 linux bot: 
http://lab.llvm.org:8014/#/builders/125/builds/125


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95915/new/

https://reviews.llvm.org/D95915

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


[PATCH] D102736: Fix tmp files being left on Windows builds.

2021-06-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Hi Amy, after your change, the compile time for one of our internal test files 
went from about 1 second to 30 seconds. I have put a repro and the details in 
PR50628, can you please take a look?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102736/new/

https://reviews.llvm.org/D102736

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


[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-06-15 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

Another +1 for it failing intermittently on the bot I watch over, 
llvm-clang-x86_64-sie-ubuntu-fast. Anything that can be done to stabilize the 
test or to remove it would be appreciated!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101868/new/

https://reviews.llvm.org/D101868

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


[PATCH] D104295: removes redundant test

2021-06-15 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment.

I'll commit it for you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104295/new/

https://reviews.llvm.org/D104295

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


[PATCH] D104295: removes redundant test

2021-06-15 Thread Douglas Yung via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGefebe76e93d5: Remove redundant test that was causing 
intermittent build bot failures. (authored by dyung).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104295/new/

https://reviews.llvm.org/D104295

Files:
  clang/test/Format/struct-array-initializer.cpp


Index: clang/test/Format/struct-array-initializer.cpp
===
--- clang/test/Format/struct-array-initializer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: 
Right}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: 
Left}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
-struct test {
-  int a;
-  int b;
-  const char *c;
-};
-
-struct toast {
-  int a;
-  const char *b;
-  int c;
-  float d;
-};
-
-void f() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}, {7, 5, "!!"}};
-  // CHECK1: {{^[[:space:]]{2}struct test demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{56,23, "hello"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{-1, 93463, "world"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{ 7, 5,"!!"}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void g() {
-  struct toast demo[] = {
-  {56, "hello world I have some things to say", 30, 4.2},
-  {93463, "those things are really comments", 1, 3.1},
-  {7, "about a wide range of topics", 789, .112233}};
-  // CHECK1: {{^[[:space:]]{2}struct toast demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{   56, "hello world I have some things 
to say",  30, 4.2},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{93463,  "those things are really 
comments",   1, 3.1},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{7,  "about a wide range of 
topics", 789, .112233}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void h() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}, {7, 5, "!!"}};
-  // CHECK2: {{^[[:space:]]{2}struct test demo\[\] = \{$}}
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{56, 23,"hello"},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{-1, 93463, "world"},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{7,  5, "!!"   }
-  // CHECK2-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void i() {
-  struct toast demo[] = {
-  {56, "hello world I have some things to say", 30, 4.2},
-  {93463, "those things are really comments", 1, 3.1},
-  {7, "about a wide range of topics", 789, .112233}};
-  // CHECK2: {{^[[:space:]]{2}struct toast demo\[\] = \{$}}
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{56,"hello world I have some things 
to say", 30,  4.2},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{93463, "those things are really 
comments",  1,   3.1},
-  // CHECK2-NEXT: {{([[:space:]]{4})}}{7, "about a wide range of topics",  
789, .112233}
-  // CHECK2-NEXT: {{^[[:space:]]{2}\};$}}
-}


Index: clang/test/Format/struct-array-initializer.cpp
===
--- clang/test/Format/struct-array-initializer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Right}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
-// RUN: grep -Ev "// *[A-Z-]+:" %s \
-// RUN:   | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Left}" %s \
-// RUN:   | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
-struct test {
-  int a;
-  int b;
-  const char *c;
-};
-
-struct toast {
-  int a;
-  const char *b;
-  int c;
-  float d;
-};
-
-void f() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}, {7, 5, "!!"}};
-  // CHECK1: {{^[[:space:]]{2}struct test demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{56,23, "hello"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{-1, 93463, "world"},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{ 7, 5,"!!"}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void g() {
-  struct toast demo[] = {
-  {56, "hello world I have some things to say", 30, 4.2},
-  {93463, "those things are really comments", 1, 3.1},
-  {7, "about a wide range of topics", 789, .112233}};
-  // CHECK1: {{^[[:space:]]{2}struct toast demo\[\] = \{$}}
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{   56, "hello world I have some things to say",  30, 4.2},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{93463,  "those things are really comments",   1, 3.1},
-  // CHECK1-NEXT: {{([[:space:]]{4})}}{7,  "about a wide range of topics", 789, .112233}
-  // CHECK1-NEXT: {{^[[:space:]]{2}\};$}}
-}
-
-void h() {
-  struct test demo[] = {{56, 23, "hello"}, {-1, 93463, "world"}

  1   2   3   >