Optimize ExtractOffset() by avoiding storing the mask.

Currently, the constant mask is stored to memory and then immediately read back. Since the read address is often not aligned to the store address, this can cause an expensive Read-after-Write hazard. Although the load is contained entirely within the store, meaning that store forwarding can occur and there are no throughput penalties, there is still a latency penalty. The increased latency matters because of the pointer-chasing pattern in decompression here.

https://godbolt.org/z/e71jhE3bj

PiperOrigin-RevId: 626440765
diff --git a/snappy.cc b/snappy.cc
index 708c57d..d689aac 100644
--- a/snappy.cc
+++ b/snappy.cc
@@ -1344,11 +1344,11 @@
 
 // Extract the offset for copy-1 and copy-2 returns 0 for literals or copy-4.
 inline uint32_t ExtractOffset(uint32_t val, size_t tag_type) {
-  // For x86 non-static storage works better. For ARM static storage is better.
+  // For Arm non-static storage works better. For x86 static storage is better.
   // TODO: Once the array is recognized as a register, improve the
   // readability for x86.
 #if defined(__x86_64__)
-  constexpr uint64_t kExtractMasksCombined = 0x0000FFFF00FF0000ull;
+  static constexpr uint64_t kExtractMasksCombined = 0x0000FFFF00FF0000ull;
   uint16_t result;
   memcpy(&result,
          reinterpret_cast<const char*>(&kExtractMasksCombined) + 2 * tag_type,