[llvm-branch-commits] [clang] 7c28408 - Revert "Revert "[OpenMP][TR12] change property of map-type modifier." (#90885)"

2024-05-02 Thread via llvm-branch-commits

Author: jyu2-git
Date: 2024-05-02T20:55:18-07:00
New Revision: 7c28408e39f83dd44a59caf7b8539e7920504277

URL: 
https://github.com/llvm/llvm-project/commit/7c28408e39f83dd44a59caf7b8539e7920504277
DIFF: 
https://github.com/llvm/llvm-project/commit/7c28408e39f83dd44a59caf7b8539e7920504277.diff

LOG: Revert "Revert "[OpenMP][TR12] change property of map-type modifier." 
(#90885)"

This reverts commit eea81aa29848361eb5b24f24d2af643fdeb9adfd.

Added: 


Modified: 
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/lib/Parse/ParseOpenMP.cpp
clang/test/OpenMP/target_ast_print.cpp
clang/test/OpenMP/target_map_messages.cpp

Removed: 




diff  --git a/clang/include/clang/Basic/DiagnosticParseKinds.td 
b/clang/include/clang/Basic/DiagnosticParseKinds.td
index fdffb35ea0d955..44bc4e0e130de8 100644
--- a/clang/include/clang/Basic/DiagnosticParseKinds.td
+++ b/clang/include/clang/Basic/DiagnosticParseKinds.td
@@ -1438,6 +1438,9 @@ def err_omp_decl_in_declare_simd_variant : Error<
 def err_omp_sink_and_source_iteration_not_allowd: Error<" '%0 
%select{sink:|source:}1' must be with '%select{omp_cur_iteration - 
1|omp_cur_iteration}1'">;
 def err_omp_unknown_map_type : Error<
   "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 
'release', or 'delete'">;
+def err_omp_more_one_map_type : Error<"map type is already specified">;
+def note_previous_map_type_specified_here
+: Note<"map type '%0' is previous specified here">;
 def err_omp_unknown_map_type_modifier : Error<
   "incorrect map type modifier, expected one of: 'always', 'close', 'mapper'"
   "%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1">;
@@ -1445,6 +1448,8 @@ def err_omp_map_type_missing : Error<
   "missing map type">;
 def err_omp_map_type_modifier_missing : Error<
   "missing map type modifier">;
+def err_omp_map_modifier_specification_list : Error<
+  "empty modifier-specification-list is not allowed">;
 def err_omp_declare_simd_inbranch_notinbranch : Error<
   "unexpected '%0' clause, '%1' is specified already">;
 def err_omp_expected_clause_argument

diff  --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 18ba1185ee8de7..b1cff11af590a5 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -4228,13 +4228,20 @@ bool 
Parser::parseMapperModifier(SemaOpenMP::OpenMPVarListDataTy ) {
   return T.consumeClose();
 }
 
+static OpenMPMapClauseKind isMapType(Parser );
+
 /// Parse map-type-modifiers in map clause.
-/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list)
+/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] [map-type] : ] list)
 /// where, map-type-modifier ::= always | close | mapper(mapper-identifier) |
 /// present
+/// where, map-type ::= alloc | delete | from | release | to | tofrom
 bool Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
+  bool HasMapType = false;
+  SourceLocation PreMapLoc = Tok.getLocation();
+  StringRef PreMapName = "";
   while (getCurToken().isNot(tok::colon)) {
 OpenMPMapModifierKind TypeModifier = isMapModifier(*this);
+OpenMPMapClauseKind MapKind = isMapType(*this);
 if (TypeModifier == OMPC_MAP_MODIFIER_always ||
 TypeModifier == OMPC_MAP_MODIFIER_close ||
 TypeModifier == OMPC_MAP_MODIFIER_present ||
@@ -4257,6 +4264,19 @@ bool 
Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
 Diag(Data.MapTypeModifiersLoc.back(), diag::err_omp_missing_comma)
 << "map type modifier";
 
+} else if (getLangOpts().OpenMP >= 60 && MapKind != OMPC_MAP_unknown) {
+  if (!HasMapType) {
+HasMapType = true;
+Data.ExtraModifier = MapKind;
+MapKind = OMPC_MAP_unknown;
+PreMapLoc = Tok.getLocation();
+PreMapName = Tok.getIdentifierInfo()->getName();
+  } else {
+Diag(Tok, diag::err_omp_more_one_map_type);
+Diag(PreMapLoc, diag::note_previous_map_type_specified_here)
+<< PreMapName;
+  }
+  ConsumeToken();
 } else {
   // For the case of unknown map-type-modifier or a map-type.
   // Map-type is followed by a colon; the function returns when it
@@ -4267,8 +4287,14 @@ bool 
Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
 continue;
   }
   // Potential map-type token as it is followed by a colon.
-  if (PP.LookAhead(0).is(tok::colon))
-return false;
+  if (PP.LookAhead(0).is(tok::colon)) {
+if (getLangOpts().OpenMP >= 60) {
+  break;
+} else {
+  return false;
+}
+  }
+
   Diag(Tok, diag::err_omp_unknown_map_type_modifier)
   << (getLangOpts().OpenMP >= 51 ? (getLangOpts().OpenMP >= 52 ? 2 : 1)
  : 0)
@@ -4278,6 +4304,14 @@ bool 

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90811


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


[llvm-branch-commits] [BOLT][NFCI] Allow non-simple functions to be in disassembled state (PR #90806)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov converted_to_draft 
https://github.com/llvm/llvm-project/pull/90806
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90807
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90807
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov updated 
https://github.com/llvm/llvm-project/pull/90807


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


[llvm-branch-commits] [llvm] [nfc][ThinLTO] Generate import status in per-module combined summary (PR #88024)

2024-05-02 Thread Mingming Liu via llvm-branch-commits

https://github.com/minglotus-6 updated 
https://github.com/llvm/llvm-project/pull/88024

>From cfb63d775d43a28b560d938346f1dd4b2dddc765 Mon Sep 17 00:00:00 2001
From: mingmingl 
Date: Thu, 4 Apr 2024 11:54:17 -0700
Subject: [PATCH 1/5] function import changes

---
 llvm/include/llvm/IR/ModuleSummaryIndex.h |  24 
 .../llvm/Transforms/IPO/FunctionImport.h  |  18 ++-
 llvm/lib/LTO/LTO.cpp  |  13 +-
 llvm/lib/LTO/LTOBackend.cpp   |   5 +-
 llvm/lib/LTO/ThinLTOCodeGenerator.cpp |   9 +-
 llvm/lib/Transforms/IPO/FunctionImport.cpp| 130 --
 llvm/tools/llvm-link/llvm-link.cpp|   2 +-
 7 files changed, 146 insertions(+), 55 deletions(-)

diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h 
b/llvm/include/llvm/IR/ModuleSummaryIndex.h
index 286b51bda0e2c1..259fe56ce5f63e 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndex.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -296,6 +296,30 @@ template <> struct DenseMapInfo {
   static unsigned getHashValue(ValueInfo I) { return (uintptr_t)I.getRef(); }
 };
 
+struct SummaryImportInfo {
+  enum class ImportType : uint8_t {
+NotImported = 0,
+Declaration = 1,
+Definition = 2,
+  };
+  unsigned Type : 3;
+  SummaryImportInfo() : Type(static_cast(ImportType::NotImported)) {}
+  SummaryImportInfo(ImportType Type) : Type(static_cast(Type)) {}
+
+  // FIXME: delete the first two set* helper function.
+  void updateType(ImportType InputType) {
+Type = std::max(Type, static_cast(InputType));
+  }
+
+  bool isDefinition() const {
+return static_cast(Type) == ImportType::Definition;
+  }
+
+  bool isDeclaration() const {
+return static_cast(Type) == ImportType::Declaration;
+  }
+};
+
 /// Summary of memprof callsite metadata.
 struct CallsiteInfo {
   // Actual callee function.
diff --git a/llvm/include/llvm/Transforms/IPO/FunctionImport.h 
b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
index c4d19e8641eca2..9adc0c31eed439 100644
--- a/llvm/include/llvm/Transforms/IPO/FunctionImport.h
+++ b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
@@ -33,7 +33,14 @@ class FunctionImporter {
 public:
   /// Set of functions to import from a source module. Each entry is a set
   /// containing all the GUIDs of all functions to import for a source module.
-  using FunctionsToImportTy = std::unordered_set;
+  using FunctionsToImportTy = DenseMap;
+
+  // FIXME: Remove this.
+  enum ImportStatus {
+NotImported,
+ImportDeclaration,
+ImportDefinition,
+  };
 
   /// The different reasons selectCallee will chose not to import a
   /// candidate.
@@ -99,8 +106,10 @@ class FunctionImporter {
   /// index's module path string table).
   using ImportMapTy = DenseMap;
 
-  /// The set contains an entry for every global value the module exports.
-  using ExportSetTy = DenseSet;
+  /// The map contains an entry for every global value the module exports, the
+  /// key being the value info, and the value is the summary-based import info.
+  /// FIXME: Does this set need to be a map?
+  using ExportSetTy = DenseMap;
 
   /// A function of this type is used to load modules referenced by the index.
   using ModuleLoaderTy =
@@ -211,7 +220,8 @@ void gatherImportedSummariesForModule(
 StringRef ModulePath,
 const DenseMap ,
 const FunctionImporter::ImportMapTy ,
-std::map );
+std::map ,
+ModuleToGVSummaryPtrSet );
 
 /// Emit into \p OutputFilename the files module \p ModulePath will import 
from.
 std::error_code EmitImportsFiles(
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 53060df7f503e0..ace533fe28c92f 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -159,7 +159,7 @@ void llvm::computeLTOCacheKey(
   std::vector ExportsGUID;
   ExportsGUID.reserve(ExportList.size());
   for (const auto  : ExportList) {
-auto GUID = VI.getGUID();
+auto GUID = VI.first.getGUID();
 ExportsGUID.push_back(GUID);
   }
 
@@ -205,7 +205,7 @@ void llvm::computeLTOCacheKey(
 
 AddUint64(Entry.getFunctions().size());
 for (auto  : Entry.getFunctions())
-  AddUint64(Fn);
+  AddUint64(Fn.first);
   }
 
   // Include the hash for the resolved ODR.
@@ -277,7 +277,7 @@ void llvm::computeLTOCacheKey(
   for (const ImportModule  : ImportModulesVector)
 for (auto  : ImpM.getFunctions()) {
   GlobalValueSummary *S =
-  Index.findSummaryInModule(ImpF, ImpM.getIdentifier());
+  Index.findSummaryInModule(ImpF.first, ImpM.getIdentifier());
   AddUsedThings(S);
   // If this is an alias, we also care about any types/etc. that the 
aliasee
   // may reference.
@@ -1389,15 +1389,18 @@ class lto::ThinBackendProc {
   llvm::StringRef ModulePath,
   const std::string ) {
 std::map ModuleToSummariesForIndex;
+ModuleToGVSummaryPtrSet ModuleToDeclarationSummaries;
 std::error_code EC;
 gatherImportedSummariesForModule(ModulePath, 

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits

https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90811
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++][TZDB] Implements time_zone::to_sys. (PR #90901)

2024-05-02 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-libcxx

Author: Mark de Wever (mordante)


Changes

This implements the overload with the choose argument and adds this enum.

Implements parts of:
- P0355 Extending chrono to Calendars and Time Zones

---
Full diff: https://github.com/llvm/llvm-project/pull/90901.diff


7 Files Affected:

- (modified) libcxx/include/__chrono/time_zone.h (+33) 
- (modified) libcxx/include/chrono (+4) 
- (modified) libcxx/modules/std/chrono.inc (-3) 
- (modified) libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp (+3) 
- (added) libcxx/test/libcxx/time/time.zone/time.zone.timezone/choose.pass.cpp 
(+37) 
- (added) 
libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp
 (+41) 
- (added) 
libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp
 (+147) 


``diff
diff --git a/libcxx/include/__chrono/time_zone.h 
b/libcxx/include/__chrono/time_zone.h
index b7ce4ea659a1af..ec0eee44c3b6f9 100644
--- a/libcxx/include/__chrono/time_zone.h
+++ b/libcxx/include/__chrono/time_zone.h
@@ -42,6 +42,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace chrono {
 
+enum class choose { earliest, latest };
+
 class _LIBCPP_AVAILABILITY_TZDB time_zone {
   _LIBCPP_HIDE_FROM_ABI time_zone() = default;
 
@@ -96,6 +98,37 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
 return {};
   }
 
+  template 
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI sys_time>
+  to_sys(const local_time<_Duration>& __time, choose __z) const {
+local_info __info = get_info(__time);
+switch (__info.result) {
+case local_info::unique:
+case local_info::nonexistent: // first and second are the same
+  return sys_time>{__time.time_since_epoch() - __info.first.offset};
+
+case local_info::ambiguous:
+  switch (__z) {
+  case choose::earliest:
+return sys_time>{__time.time_since_epoch() - __info.first.offset};
+
+  case choose::latest:
+return sys_time>{__time.time_since_epoch() - __info.second.offset};
+
+// Note a value out of bounds is not specified.
+  }
+  [[fallthrough]];
+}
+
+// TODO TZDB The standard does not specify anything in these cases.
+_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
+__info.result != -1, "cannot convert the local time; it would be 
before the minimum system clock value");
+_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
+__info.result != -2, "cannot convert the local time; it would be after 
the maximum system clock value");
+
+return {};
+  }
+
   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI const __impl& __implementation() const 
noexcept { return *__impl_; }
 
 private:
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index 4b0ea938710bdd..c70b241f086464 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -774,6 +774,10 @@ class time_zone {
   template
   sys_time>
 to_sys(const local_time& tp) const;
+
+  template
+  sys_time>
+to_sys(const local_time& tp, choose z) const;
 };
 bool operator==(const time_zone& x, const time_zone& y) noexcept;  
  // C++20
 strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept;  
  // C++20
diff --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index 38e3c4184521b7..9e16f09bd31afb 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -216,11 +216,8 @@ export namespace std {
 using std::chrono::local_info;
 using std::chrono::sys_info;
 
-#if 0
 // [time.zone.timezone], class time_zone
 using std::chrono::choose;
-#endif // if 0
-
 using std::chrono::time_zone;
 
 #if 0
diff --git a/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp 
b/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
index fea1e4417cc12c..cba7916ff2c646 100644
--- a/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
@@ -49,9 +49,12 @@ void test() {
   {
 std::chrono::sys_seconds s{};
 std::chrono::local_seconds l{};
+std::chrono::choose z = std::chrono::choose::earliest;
 tz.name();   // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 tz.get_info(s);  // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 tz.get_info(l);  // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
+tz.to_sys(l);// not nodiscard
+tz.to_sys(l, z); // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 operator==(tz, tz);  // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 operator<=>(tz, tz); // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
   }
diff --git 

[llvm-branch-commits] [libcxx] [libc++][TZDB] Implements time_zone::to_sys. (PR #90901)

2024-05-02 Thread Mark de Wever via llvm-branch-commits

https://github.com/mordante created 
https://github.com/llvm/llvm-project/pull/90901

This implements the overload with the choose argument and adds this enum.

Implements parts of:
- P0355 Extending chrono to Calendars and Time Zones

>From b888e3cc20a9198578348ac3bf3f6d505425a63c Mon Sep 17 00:00:00 2001
From: Mark de Wever 
Date: Wed, 17 Apr 2024 21:00:22 +0200
Subject: [PATCH] [libc++][TZDB] Implements time_zone::to_sys.

This implements the overload with the choose argument and adds this enum.

Implements parts of:
- P0355 Extending chrono to Calendars and Time Zones
---
 libcxx/include/__chrono/time_zone.h   |  33 
 libcxx/include/chrono |   4 +
 libcxx/modules/std/chrono.inc |   3 -
 .../diagnostics/chrono.nodiscard.verify.cpp   |   3 +
 .../time.zone.timezone/choose.pass.cpp|  37 +
 .../assert.to_sys_choose.pass.cpp |  41 +
 .../time.zone.members/to_sys_choose.pass.cpp  | 147 ++
 7 files changed, 265 insertions(+), 3 deletions(-)
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.timezone/choose.pass.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys_choose.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys_choose.pass.cpp

diff --git a/libcxx/include/__chrono/time_zone.h 
b/libcxx/include/__chrono/time_zone.h
index b7ce4ea659a1af..ec0eee44c3b6f9 100644
--- a/libcxx/include/__chrono/time_zone.h
+++ b/libcxx/include/__chrono/time_zone.h
@@ -42,6 +42,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace chrono {
 
+enum class choose { earliest, latest };
+
 class _LIBCPP_AVAILABILITY_TZDB time_zone {
   _LIBCPP_HIDE_FROM_ABI time_zone() = default;
 
@@ -96,6 +98,37 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
 return {};
   }
 
+  template 
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI sys_time>
+  to_sys(const local_time<_Duration>& __time, choose __z) const {
+local_info __info = get_info(__time);
+switch (__info.result) {
+case local_info::unique:
+case local_info::nonexistent: // first and second are the same
+  return sys_time>{__time.time_since_epoch() - __info.first.offset};
+
+case local_info::ambiguous:
+  switch (__z) {
+  case choose::earliest:
+return sys_time>{__time.time_since_epoch() - __info.first.offset};
+
+  case choose::latest:
+return sys_time>{__time.time_since_epoch() - __info.second.offset};
+
+// Note a value out of bounds is not specified.
+  }
+  [[fallthrough]];
+}
+
+// TODO TZDB The standard does not specify anything in these cases.
+_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
+__info.result != -1, "cannot convert the local time; it would be 
before the minimum system clock value");
+_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
+__info.result != -2, "cannot convert the local time; it would be after 
the maximum system clock value");
+
+return {};
+  }
+
   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI const __impl& __implementation() const 
noexcept { return *__impl_; }
 
 private:
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index 4b0ea938710bdd..c70b241f086464 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -774,6 +774,10 @@ class time_zone {
   template
   sys_time>
 to_sys(const local_time& tp) const;
+
+  template
+  sys_time>
+to_sys(const local_time& tp, choose z) const;
 };
 bool operator==(const time_zone& x, const time_zone& y) noexcept;  
  // C++20
 strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept;  
  // C++20
diff --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index 38e3c4184521b7..9e16f09bd31afb 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -216,11 +216,8 @@ export namespace std {
 using std::chrono::local_info;
 using std::chrono::sys_info;
 
-#if 0
 // [time.zone.timezone], class time_zone
 using std::chrono::choose;
-#endif // if 0
-
 using std::chrono::time_zone;
 
 #if 0
diff --git a/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp 
b/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
index fea1e4417cc12c..cba7916ff2c646 100644
--- a/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/chrono.nodiscard.verify.cpp
@@ -49,9 +49,12 @@ void test() {
   {
 std::chrono::sys_seconds s{};
 std::chrono::local_seconds l{};
+std::chrono::choose z = std::chrono::choose::earliest;
 tz.name();   // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 tz.get_info(s);  // expected-warning {{ignoring return value of 
function declared with 'nodiscard' attribute}}
 tz.get_info(l);  // expected-warning {{ignoring return value of 
function declared with 'nodiscard' 

[llvm-branch-commits] [clang] a6ca95f - Revert "[OpenMP][TR12] change property of map-type modifier. (#90499)"

2024-05-02 Thread via llvm-branch-commits

Author: Vitaly Buka
Date: 2024-05-02T11:32:32-07:00
New Revision: a6ca95f5e2991fb7f857f70436148a6abdecec00

URL: 
https://github.com/llvm/llvm-project/commit/a6ca95f5e2991fb7f857f70436148a6abdecec00
DIFF: 
https://github.com/llvm/llvm-project/commit/a6ca95f5e2991fb7f857f70436148a6abdecec00.diff

LOG: Revert "[OpenMP][TR12] change property of map-type modifier. (#90499)"

This reverts commit f050660f4a60415cd840f7fba7ac3698c38376d0.

Added: 


Modified: 
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/lib/Parse/ParseOpenMP.cpp
clang/test/OpenMP/target_ast_print.cpp
clang/test/OpenMP/target_map_messages.cpp

Removed: 




diff  --git a/clang/include/clang/Basic/DiagnosticParseKinds.td 
b/clang/include/clang/Basic/DiagnosticParseKinds.td
index 44bc4e0e130de8..fdffb35ea0d955 100644
--- a/clang/include/clang/Basic/DiagnosticParseKinds.td
+++ b/clang/include/clang/Basic/DiagnosticParseKinds.td
@@ -1438,9 +1438,6 @@ def err_omp_decl_in_declare_simd_variant : Error<
 def err_omp_sink_and_source_iteration_not_allowd: Error<" '%0 
%select{sink:|source:}1' must be with '%select{omp_cur_iteration - 
1|omp_cur_iteration}1'">;
 def err_omp_unknown_map_type : Error<
   "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 
'release', or 'delete'">;
-def err_omp_more_one_map_type : Error<"map type is already specified">;
-def note_previous_map_type_specified_here
-: Note<"map type '%0' is previous specified here">;
 def err_omp_unknown_map_type_modifier : Error<
   "incorrect map type modifier, expected one of: 'always', 'close', 'mapper'"
   "%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1">;
@@ -1448,8 +1445,6 @@ def err_omp_map_type_missing : Error<
   "missing map type">;
 def err_omp_map_type_modifier_missing : Error<
   "missing map type modifier">;
-def err_omp_map_modifier_specification_list : Error<
-  "empty modifier-specification-list is not allowed">;
 def err_omp_declare_simd_inbranch_notinbranch : Error<
   "unexpected '%0' clause, '%1' is specified already">;
 def err_omp_expected_clause_argument

diff  --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 53d89ce2fa3e99..480201bc06f613 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -4228,20 +4228,13 @@ bool 
Parser::parseMapperModifier(SemaOpenMP::OpenMPVarListDataTy ) {
   return T.consumeClose();
 }
 
-static OpenMPMapClauseKind isMapType(Parser );
-
 /// Parse map-type-modifiers in map clause.
-/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] [map-type] : ] list)
+/// map([ [map-type-modifier[,] [map-type-modifier[,] ...] map-type : ] list)
 /// where, map-type-modifier ::= always | close | mapper(mapper-identifier) |
 /// present
-/// where, map-type ::= alloc | delete | from | release | to | tofrom
 bool Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
-  bool HasMapType = false;
-  SourceLocation PreMapLoc = Tok.getLocation();
-  StringRef PreMapName = "";
   while (getCurToken().isNot(tok::colon)) {
 OpenMPMapModifierKind TypeModifier = isMapModifier(*this);
-OpenMPMapClauseKind MapKind = isMapType(*this);
 if (TypeModifier == OMPC_MAP_MODIFIER_always ||
 TypeModifier == OMPC_MAP_MODIFIER_close ||
 TypeModifier == OMPC_MAP_MODIFIER_present ||
@@ -4264,19 +4257,6 @@ bool 
Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
 Diag(Data.MapTypeModifiersLoc.back(), diag::err_omp_missing_comma)
 << "map type modifier";
 
-} else if (getLangOpts().OpenMP >= 60 && MapKind != OMPC_MAP_unknown) {
-  if (!HasMapType) {
-HasMapType = true;
-Data.ExtraModifier = MapKind;
-MapKind = OMPC_MAP_unknown;
-PreMapLoc = Tok.getLocation();
-PreMapName = Tok.getIdentifierInfo()->getName();
-  } else {
-Diag(Tok, diag::err_omp_more_one_map_type);
-Diag(PreMapLoc, diag::note_previous_map_type_specified_here)
-<< PreMapName;
-  }
-  ConsumeToken();
 } else {
   // For the case of unknown map-type-modifier or a map-type.
   // Map-type is followed by a colon; the function returns when it
@@ -4287,14 +4267,8 @@ bool 
Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
 continue;
   }
   // Potential map-type token as it is followed by a colon.
-  if (PP.LookAhead(0).is(tok::colon)) {
-if (getLangOpts().OpenMP >= 60) {
-  break;
-} else {
-  return false;
-}
-  }
-
+  if (PP.LookAhead(0).is(tok::colon))
+return false;
   Diag(Tok, diag::err_omp_unknown_map_type_modifier)
   << (getLangOpts().OpenMP >= 51 ? (getLangOpts().OpenMP >= 52 ? 2 : 1)
  : 0)
@@ -4304,14 +4278,6 @@ bool 

[llvm-branch-commits] [libcxx] release/18.x: [libcxx] [modules] Add _LIBCPP_USING_IF_EXISTS on aligned_alloc (#89827) (PR #89894)

2024-05-02 Thread Mark de Wever via llvm-branch-commits

mordante wrote:

I don't feel like this needs a release note.

https://github.com/llvm/llvm-project/pull/89894
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++][TZDB] Implements time_zone::to_sys. (PR #90394)

2024-05-02 Thread Mark de Wever via llvm-branch-commits

https://github.com/mordante updated 
https://github.com/llvm/llvm-project/pull/90394

>From d7b42718303e017acfe3e61c67d6e8a9bb0ffa9d Mon Sep 17 00:00:00 2001
From: Mark de Wever 
Date: Wed, 17 Apr 2024 21:00:22 +0200
Subject: [PATCH] [libc++][TZDB] Implements time_zone::to_sys.

This implements the throwing overload and the exception classes throw by
this overload.

Implements parts of:
- P0355 Extending chrono to Calendars and Time Zones
---
 libcxx/include/CMakeLists.txt |   1 +
 libcxx/include/__chrono/exception.h   | 129 ++
 libcxx/include/__chrono/time_zone.h   |  26 ++
 libcxx/include/chrono |   9 +
 libcxx/include/module.modulemap   |   6 +-
 libcxx/modules/std/chrono.inc |   2 -
 libcxx/src/CMakeLists.txt |   3 +
 libcxx/src/chrono_exception.cpp   |  20 ++
 .../assert.ctor.pass.cpp  |  53 
 .../assert.ctor.pass.cpp  |  53 
 .../time.zone.members/assert.to_sys.pass.cpp  |  39 +++
 .../test/libcxx/transitive_includes/cxx03.csv |   3 -
 .../test/libcxx/transitive_includes/cxx11.csv |   3 -
 .../test/libcxx/transitive_includes/cxx14.csv |   3 -
 .../test/libcxx/transitive_includes/cxx17.csv |   3 -
 .../test/libcxx/transitive_includes/cxx20.csv |   8 +-
 .../test/libcxx/transitive_includes/cxx23.csv |  12 +-
 .../test/libcxx/transitive_includes/cxx26.csv |  12 +-
 .../time.zone.exception.ambig/ctor.pass.cpp   | 171 +
 .../types.compile.pass.cpp|  33 +++
 .../ctor.pass.cpp | 172 +
 .../types.compile.pass.cpp|  33 +++
 .../time.zone.members/to_sys.pass.cpp | 237 ++
 23 files changed, 987 insertions(+), 44 deletions(-)
 create mode 100644 libcxx/include/__chrono/exception.h
 create mode 100644 libcxx/src/chrono_exception.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/ctor.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/types.compile.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/ctor.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.compile.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp

diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 1296c536bc882c..386bd967eed7ab 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -264,6 +264,7 @@ set(files
   __chrono/convert_to_tm.h
   __chrono/day.h
   __chrono/duration.h
+  __chrono/exception.h
   __chrono/file_clock.h
   __chrono/formatter.h
   __chrono/hh_mm_ss.h
diff --git a/libcxx/include/__chrono/exception.h 
b/libcxx/include/__chrono/exception.h
new file mode 100644
index 00..6059a62c3b2ea9
--- /dev/null
+++ b/libcxx/include/__chrono/exception.h
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+// For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
+
+#ifndef _LIBCPP___CHRONO_EXCEPTION_H
+#define _LIBCPP___CHRONO_EXCEPTION_H
+
+#include 
+// Enable the contents of the header only when libc++ was built with 
experimental features enabled.
+#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
+
+#  include <__availability>
+#  include <__chrono/calendar.h>
+#  include <__chrono/local_info.h>
+#  include <__chrono/time_point.h>
+#  include <__config>
+#  include <__verbose_abort>
+#  include 
+#  include 
+#  include 
+
+#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#  endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#  if _LIBCPP_STD_VER >= 20
+
+namespace chrono {
+
+class nonexistent_local_time : public runtime_error {
+public:
+  template 
+  _LIBCPP_HIDE_FROM_ABI nonexistent_local_time(const local_time<_Duration>& 
__time, const local_info& __info)
+  : runtime_error{__create_message(__time, __info)} {
+// [time.zone.exception.nonexist]/2
+//   Preconditions: i.result == local_info::nonexistent is true.
+// The value of 

[llvm-branch-commits] [clang] [analyzer] Backport performace regression fix (PR #89725)

2024-05-02 Thread Balazs Benics via llvm-branch-commits

steakhal wrote:

> Hi @steakhal (or anyone else). If you would like to add a note about this fix 
> in the release notes (completely optional). Please reply to this comment with 
> a one or two sentence description of the fix. When you are done, please add 
> the release:note label to this PR.

I think this would work: "In previous dot releases, we had a critical slowdown 
on analyzing code hashing or doing many array accesses. This bug did not affect 
previous major releases. See the details at issue #89045."

https://github.com/llvm/llvm-project/pull/89725
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] Reapply "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)" (PR #90267)

2024-05-02 Thread Paul Kirth via llvm-branch-commits

https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/90267


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


[llvm-branch-commits] Reapply "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)" (PR #90267)

2024-05-02 Thread Paul Kirth via llvm-branch-commits

https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/90267


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


[llvm-branch-commits] Reapply "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)" (PR #90267)

2024-05-02 Thread Paul Kirth via llvm-branch-commits

https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/90267


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


[llvm-branch-commits] Reapply "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)" (PR #90267)

2024-05-02 Thread Paul Kirth via llvm-branch-commits

https://github.com/ilovepi updated 
https://github.com/llvm/llvm-project/pull/90267


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


[llvm-branch-commits] [clang] Backport fix for crash reported in #88181 (PR #89022)

2024-05-02 Thread Balazs Benics via llvm-branch-commits

steakhal wrote:

> Hi @steakhal (or anyone else). If you would like to add a note about this fix 
> in the release notes (completely optional). Please reply to this comment with 
> a one or two sentence description of the fix. When you are done, please add 
> the release:note label to this PR.

I think what I added to the `clang/docs/ReleaseNotes.rst` in this PR should 
also work for you. Quote:
```
Fixed a crash in ``security.cert.env.InvalidPtr`` checker when accidentally
  matched user-defined ``strerror`` and similar library functions.
  (`#88181 `_)
```

https://github.com/llvm/llvm-project/pull/89022
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [X86] Always use 64-bit relocations in no-PIC large code model (#89101) (PR #89124)

2024-05-02 Thread Arthur Eubanks via llvm-branch-commits

aeubanks wrote:

this is mostly a fix to revert back to previous behavior in certain cases, so 
probably not worth a release note

https://github.com/llvm/llvm-project/pull/89124
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] [libc++][TZDB] Implements time_zone::to_sys. (PR #90394)

2024-05-02 Thread Mark de Wever via llvm-branch-commits

https://github.com/mordante updated 
https://github.com/llvm/llvm-project/pull/90394

>From e72a966c0aca3319d7aea43d3a9dd4cc25eaeb70 Mon Sep 17 00:00:00 2001
From: Mark de Wever 
Date: Wed, 17 Apr 2024 21:00:22 +0200
Subject: [PATCH] [libc++][TZDB] Implements time_zone::to_sys.

This implements the throwing overload and the exception classes throw by
this overload.

Implements parts of:
- P0355 Extending chrono to Calendars and Time Zones
---
 libcxx/include/CMakeLists.txt |   1 +
 libcxx/include/__chrono/exception.h   | 129 ++
 libcxx/include/__chrono/time_zone.h   |  26 ++
 libcxx/include/chrono |   9 +
 libcxx/include/module.modulemap   |   6 +-
 libcxx/modules/std/chrono.inc |   2 -
 libcxx/src/CMakeLists.txt |   3 +
 libcxx/src/chrono_exception.cpp   |  20 ++
 .../assert.ctor.pass.cpp  |  53 
 .../assert.ctor.pass.cpp  |  53 
 .../time.zone.members/assert.to_sys.pass.cpp  |  39 +++
 .../test/libcxx/transitive_includes/cxx03.csv |   3 -
 .../test/libcxx/transitive_includes/cxx11.csv |   3 -
 .../test/libcxx/transitive_includes/cxx14.csv |   3 -
 .../test/libcxx/transitive_includes/cxx17.csv |   3 -
 .../test/libcxx/transitive_includes/cxx20.csv |   8 +-
 .../test/libcxx/transitive_includes/cxx23.csv |  12 +-
 .../test/libcxx/transitive_includes/cxx26.csv |  12 +-
 .../time.zone.exception.ambig/ctor.pass.cpp   | 171 +
 .../types.compile.pass.cpp|  32 +++
 .../ctor.pass.cpp | 172 +
 .../types.compile.pass.cpp|  32 +++
 .../time.zone.members/to_sys.pass.cpp | 237 ++
 23 files changed, 985 insertions(+), 44 deletions(-)
 create mode 100644 libcxx/include/__chrono/exception.h
 create mode 100644 libcxx/src/chrono_exception.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.ambig/assert.ctor.pass.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.exception/time.zone.exception.nonexist/assert.ctor.pass.cpp
 create mode 100644 
libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_sys.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/ctor.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.ambig/types.compile.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/ctor.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.compile.pass.cpp
 create mode 100644 
libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_sys.pass.cpp

diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 1296c536bc882c..386bd967eed7ab 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -264,6 +264,7 @@ set(files
   __chrono/convert_to_tm.h
   __chrono/day.h
   __chrono/duration.h
+  __chrono/exception.h
   __chrono/file_clock.h
   __chrono/formatter.h
   __chrono/hh_mm_ss.h
diff --git a/libcxx/include/__chrono/exception.h 
b/libcxx/include/__chrono/exception.h
new file mode 100644
index 00..6059a62c3b2ea9
--- /dev/null
+++ b/libcxx/include/__chrono/exception.h
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+// For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
+
+#ifndef _LIBCPP___CHRONO_EXCEPTION_H
+#define _LIBCPP___CHRONO_EXCEPTION_H
+
+#include 
+// Enable the contents of the header only when libc++ was built with 
experimental features enabled.
+#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
+
+#  include <__availability>
+#  include <__chrono/calendar.h>
+#  include <__chrono/local_info.h>
+#  include <__chrono/time_point.h>
+#  include <__config>
+#  include <__verbose_abort>
+#  include 
+#  include 
+#  include 
+
+#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#  endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#  if _LIBCPP_STD_VER >= 20
+
+namespace chrono {
+
+class nonexistent_local_time : public runtime_error {
+public:
+  template 
+  _LIBCPP_HIDE_FROM_ABI nonexistent_local_time(const local_time<_Duration>& 
__time, const local_info& __info)
+  : runtime_error{__create_message(__time, __info)} {
+// [time.zone.exception.nonexist]/2
+//   Preconditions: i.result == local_info::nonexistent is true.
+// The value of 

[llvm-branch-commits] [flang] [Flang][OpenMP][MLIR] Initial derived type member map support (PR #82853)

2024-05-02 Thread Jan Leyonberg via llvm-branch-commits

https://github.com/jsjodin approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [AMDGPU] Fix setting nontemporal in memory legalizer (#83815) (PR #90204)

2024-05-02 Thread Tom Stellard via llvm-branch-commits

tstellar wrote:

@jayfoad If it's not noteworthy, then it's OK to not add a release note.  We 
don't typically have a list of fixed bugs in the release notes.

https://github.com/llvm/llvm-project/pull/90204
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [AMDGPU] Fix gfx12 waitcnt type for image_msaa_load (#90201) (PR #90582)

2024-05-02 Thread Matt Arsenault via llvm-branch-commits


@@ -187,8 +187,12 @@ VmemType getVmemType(const MachineInstr ) {
   const AMDGPU::MIMGInfo *Info = AMDGPU::getMIMGInfo(Inst.getOpcode());
   const AMDGPU::MIMGBaseOpcodeInfo *BaseInfo =
   AMDGPU::getMIMGBaseOpcodeInfo(Info->BaseOpcode);
-  return BaseInfo->BVH ? VMEM_BVH
-   : BaseInfo->Sampler ? VMEM_SAMPLER : VMEM_NOSAMPLER;
+  // We have to make an additional check for isVSAMPLE here since some
+  // instructions don't have a sampler, but are still classified as sampler
+  // instructions for the purposes of e.g. waitcnt.
+  return BaseInfo->BVH ? VMEM_BVH
+ : (BaseInfo->Sampler || SIInstrInfo::isVSAMPLE(Inst)) ? VMEM_SAMPLER
+   : 
VMEM_NOSAMPLER;

arsenm wrote:

Use a temporary variable? This nested ternary formatting is breaking my brain 

https://github.com/llvm/llvm-project/pull/90582
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT (PR #90827)

2024-05-02 Thread Matt Arsenault via llvm-branch-commits

https://github.com/arsenm approved this pull request.


https://github.com/llvm/llvm-project/pull/90827
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [AMDGPU] Fix setting nontemporal in memory legalizer (#83815) (PR #90204)

2024-05-02 Thread Jay Foad via llvm-branch-commits

jayfoad wrote:

> Hi @jayfoad (or anyone else). If you would like to add a note about this fix 
> in the release notes (completely optional). Please reply to this comment with 
> a one or two sentence description of the fix. When you are done, please add 
> the release:note label to this PR.

I don't think this fix is particularly noteworthy. Would there already be a 
list of bugs fixed in the release notes?

https://github.com/llvm/llvm-project/pull/90204
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT (PR #90827)

2024-05-02 Thread Amara Emerson via llvm-branch-commits

https://github.com/aemerson approved this pull request.


https://github.com/llvm/llvm-project/pull/90827
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [AMDGPU] Enhance s_waitcnt insertion before barrier for gfx12 (#90595) (PR #90719)

2024-05-02 Thread David Stuttard via llvm-branch-commits

https://github.com/dstutt approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/90719
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [X86][EVEX512] Check hasEVEX512 for canExtendTo512DQ (#90390) (PR #90422)

2024-05-02 Thread Phoebe Wang via llvm-branch-commits

phoebewang wrote:

> Hi @phoebewang (or anyone else). If you would like to add a note about this 
> fix in the release notes (completely optional). Please reply to this comment 
> with a one or two sentence description of the fix. When you are done, please 
> add the release:note label to this PR.

This patch fixes a X86 bug introduced during LLVM18, which crashes when 
compiling some bit vector with AVX512.

https://github.com/llvm/llvm-project/pull/90422
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT (PR #90827)

2024-05-02 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-llvm-globalisel

Author: None (llvmbot)


Changes

Backport a01e9ce86f4c1bc9af819902db9f287b6d23f54f

Requested by: @aemerson

---
Full diff: https://github.com/llvm/llvm-project/pull/90827.diff


2 Files Affected:

- (modified) llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp (+1) 
- (modified) 
llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir (+70) 


``diff
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp 
b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
index 4b9d549e791142..de3c89e925a2a4 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
@@ -877,6 +877,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const 
AArch64Subtarget )
 
   getActionDefinitionsBuilder(G_INSERT_VECTOR_ELT)
   .legalIf(typeInSet(0, {v16s8, v8s8, v8s16, v4s16, v4s32, v2s32, v2s64}))
+  .moreElementsToNextPow2(0)
   .widenVectorEltsToVectorMinSize(0, 64);
 
   getActionDefinitionsBuilder(G_BUILD_VECTOR)
diff --git 
a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir 
b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
index 6f6cf2cc165b9f..e12353c7ef5bec 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
@@ -216,3 +216,73 @@ body: |
 $q0 = COPY %2(<2 x s64>)
 RET_ReallyLR
 ...
+---
+name:v3s8_crash
+body: |
+  ; CHECK-LABEL: name: v3s8_crash
+  ; CHECK: bb.0:
+  ; CHECK-NEXT:   successors: %bb.1(0x8000)
+  ; CHECK-NEXT:   liveins: $w1, $w2, $w3, $x0
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:_(p0) = COPY $x0
+  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
+  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
+  ; CHECK-NEXT:   [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
+  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 0
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.1:
+  ; CHECK-NEXT:   successors: %bb.1(0x8000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
+  ; CHECK-NEXT:   [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
+  ; CHECK-NEXT:   [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
+  ; CHECK-NEXT:   [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
+  ; CHECK-NEXT:   [[DEF2:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR 
[[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[DEF2]](s16)
+  ; CHECK-NEXT:   [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
+  ; CHECK-NEXT:   [[IVEC:%[0-9]+]]:_(<4 x s16>) = G_INSERT_VECTOR_ELT 
[[BUILD_VECTOR]], [[C2]](s16), [[C1]](s64)
+  ; CHECK-NEXT:   [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16), 
[[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[IVEC]](<4 x 
s16>)
+  ; CHECK-NEXT:   [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[UV]](s16)
+  ; CHECK-NEXT:   [[TRUNC4:%[0-9]+]]:_(s8) = G_TRUNC [[UV1]](s16)
+  ; CHECK-NEXT:   [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[UV2]](s16)
+  ; CHECK-NEXT:   [[BUILD_VECTOR1:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR 
[[TRUNC3]](s8), [[TRUNC4]](s8), [[TRUNC5]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8)
+  ; CHECK-NEXT:   [[BUILD_VECTOR2:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR 
[[C]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8)
+  ; CHECK-NEXT:   [[SHUF:%[0-9]+]]:_(<16 x s8>) = G_SHUFFLE_VECTOR 
[[BUILD_VECTOR1]](<16 x s8>), [[BUILD_VECTOR2]], shufflemask(0, 16, 16, 16, 1, 
16, 16, 16, 2, 16, 16, 16, undef, undef, undef, undef)
+  ; CHECK-NEXT:   [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[SHUF]](<16 x 
s8>)
+  ; CHECK-NEXT:   [[UITOFP:%[0-9]+]]:_(<4 x s32>) = G_UITOFP [[BITCAST]](<4 x 
s32>)
+  ; CHECK-NEXT:   [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), 
[[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UITOFP]](<4 
x s32>)
+  ; CHECK-NEXT:   G_STORE [[UV4]](s32), [[COPY]](p0) :: (store (s32), align 16)
+  ; CHECK-NEXT:   [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
+  ; CHECK-NEXT:   [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C3]](s64)
+  ; CHECK-NEXT:   G_STORE [[UV5]](s32), [[PTR_ADD]](p0) :: (store (s32) into 
unknown-address + 4)
+  ; CHECK-NEXT:   [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
+  ; CHECK-NEXT:   [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C4]](s64)
+  ; CHECK-NEXT:   G_STORE [[UV6]](s32), [[PTR_ADD1]](p0) :: (store (s32) into 
unknown-address + 8, align 8)
+  ; CHECK-NEXT:   G_BR %bb.1
+  bb.1:
+

[llvm-branch-commits] [llvm] release/18.x: [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT (PR #90827)

2024-05-02 Thread via llvm-branch-commits

https://github.com/llvmbot milestoned 
https://github.com/llvm/llvm-project/pull/90827
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/18.x: [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT (PR #90827)

2024-05-02 Thread via llvm-branch-commits

https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/90827

Backport a01e9ce86f4c1bc9af819902db9f287b6d23f54f

Requested by: @aemerson

>From 8783fd1f03c5e8b16501665956661279d8522a94 Mon Sep 17 00:00:00 2001
From: Amara Emerson 
Date: Thu, 7 Mar 2024 15:38:33 -0800
Subject: [PATCH] [AArc64][GlobalISel] Fix legalizer assert for
 G_INSERT_VECTOR_ELT

We should moreElements <3 x s1> to <4 x s1> before we try to widen the element,
otherwise we end up with a <3 x s21> nonsense type.

(cherry picked from commit a01e9ce86f4c1bc9af819902db9f287b6d23f54f)
---
 .../AArch64/GISel/AArch64LegalizerInfo.cpp|  1 +
 .../GlobalISel/legalize-insert-vector-elt.mir | 70 +++
 2 files changed, 71 insertions(+)

diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp 
b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
index 4b9d549e791142..de3c89e925a2a4 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
@@ -877,6 +877,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const 
AArch64Subtarget )
 
   getActionDefinitionsBuilder(G_INSERT_VECTOR_ELT)
   .legalIf(typeInSet(0, {v16s8, v8s8, v8s16, v4s16, v4s32, v2s32, v2s64}))
+  .moreElementsToNextPow2(0)
   .widenVectorEltsToVectorMinSize(0, 64);
 
   getActionDefinitionsBuilder(G_BUILD_VECTOR)
diff --git 
a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir 
b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
index 6f6cf2cc165b9f..e12353c7ef5bec 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
@@ -216,3 +216,73 @@ body: |
 $q0 = COPY %2(<2 x s64>)
 RET_ReallyLR
 ...
+---
+name:v3s8_crash
+body: |
+  ; CHECK-LABEL: name: v3s8_crash
+  ; CHECK: bb.0:
+  ; CHECK-NEXT:   successors: %bb.1(0x8000)
+  ; CHECK-NEXT:   liveins: $w1, $w2, $w3, $x0
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:_(p0) = COPY $x0
+  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
+  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
+  ; CHECK-NEXT:   [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
+  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 0
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.1:
+  ; CHECK-NEXT:   successors: %bb.1(0x8000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
+  ; CHECK-NEXT:   [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
+  ; CHECK-NEXT:   [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
+  ; CHECK-NEXT:   [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
+  ; CHECK-NEXT:   [[DEF2:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
+  ; CHECK-NEXT:   [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR 
[[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[DEF2]](s16)
+  ; CHECK-NEXT:   [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
+  ; CHECK-NEXT:   [[IVEC:%[0-9]+]]:_(<4 x s16>) = G_INSERT_VECTOR_ELT 
[[BUILD_VECTOR]], [[C2]](s16), [[C1]](s64)
+  ; CHECK-NEXT:   [[UV:%[0-9]+]]:_(s16), [[UV1:%[0-9]+]]:_(s16), 
[[UV2:%[0-9]+]]:_(s16), [[UV3:%[0-9]+]]:_(s16) = G_UNMERGE_VALUES [[IVEC]](<4 x 
s16>)
+  ; CHECK-NEXT:   [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[UV]](s16)
+  ; CHECK-NEXT:   [[TRUNC4:%[0-9]+]]:_(s8) = G_TRUNC [[UV1]](s16)
+  ; CHECK-NEXT:   [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[UV2]](s16)
+  ; CHECK-NEXT:   [[BUILD_VECTOR1:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR 
[[TRUNC3]](s8), [[TRUNC4]](s8), [[TRUNC5]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8)
+  ; CHECK-NEXT:   [[BUILD_VECTOR2:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR 
[[C]](s8), [[DEF]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), 
[[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8), [[DEF1]](s8)
+  ; CHECK-NEXT:   [[SHUF:%[0-9]+]]:_(<16 x s8>) = G_SHUFFLE_VECTOR 
[[BUILD_VECTOR1]](<16 x s8>), [[BUILD_VECTOR2]], shufflemask(0, 16, 16, 16, 1, 
16, 16, 16, 2, 16, 16, 16, undef, undef, undef, undef)
+  ; CHECK-NEXT:   [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[SHUF]](<16 x 
s8>)
+  ; CHECK-NEXT:   [[UITOFP:%[0-9]+]]:_(<4 x s32>) = G_UITOFP [[BITCAST]](<4 x 
s32>)
+  ; CHECK-NEXT:   [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), 
[[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UITOFP]](<4 
x s32>)
+  ; CHECK-NEXT:   G_STORE [[UV4]](s32), [[COPY]](p0) :: (store (s32), align 16)
+  ; CHECK-NEXT:   [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
+  ; CHECK-NEXT:   [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C3]](s64)
+  ; CHECK-NEXT:   G_STORE [[UV5]](s32), [[PTR_ADD]](p0) :: (store (s32) into