Lines Matching full:chunk
20 /// Helper function which extracts the specified 16-bit chunk from a
23 assert(ChunkIdx < 4 && "Out of range chunk index specified!"); in getChunk()
28 /// Check whether the given 16-bit chunk replicated to full 64-bit width
30 static bool canUseOrr(uint64_t Chunk, uint64_t &Encoding) { in canUseOrr() argument
31 Chunk = (Chunk << 48) | (Chunk << 32) | (Chunk << 16) | Chunk; in canUseOrr()
33 return AArch64_AM::processLogicalImmediate(Chunk, 64, Encoding); in canUseOrr()
49 // Scan the constant and count how often every chunk occurs. in tryToreplicateChunks()
54 for (const auto &Chunk : Counts) { in tryToreplicateChunks() local
55 const uint64_t ChunkVal = Chunk.first; in tryToreplicateChunks()
56 const unsigned Count = Chunk.second; in tryToreplicateChunks()
71 // Find the first chunk not materialized with the ORR instruction. in tryToreplicateChunks()
88 // Find the remaining chunk which needs to be materialized. in tryToreplicateChunks()
103 /// Check whether this chunk matches the pattern '1...0...'. This pattern
106 static bool isStartChunk(uint64_t Chunk) { in isStartChunk() argument
107 if (Chunk == 0 || Chunk == std::numeric_limits<uint64_t>::max()) in isStartChunk()
110 return isMask_64(~Chunk); in isStartChunk()
113 /// Check whether this chunk matches the pattern '0...1...' This pattern
116 static bool isEndChunk(uint64_t Chunk) { in isEndChunk() argument
117 if (Chunk == 0 || Chunk == std::numeric_limits<uint64_t>::max()) in isEndChunk()
120 return isMask_64(Chunk); in isEndChunk()
123 /// Clear or set all bits in the chunk at the given index.
128 // Clear chunk in the immediate. in updateImm()
131 // Set all bits in the immediate for the particular chunk. in updateImm()
143 /// Assuming S is a chunk which starts the sequence (1...0...), E is a chunk
145 /// contain at least one S and E chunk.
159 int64_t Chunk = getChunk(UImm, Idx); in trySequenceOfOnes() local
160 // Sign extend the 16-bit chunk to 64-bit. in trySequenceOfOnes()
161 Chunk = (Chunk << 48) >> 48; in trySequenceOfOnes()
163 if (isStartChunk(Chunk)) in trySequenceOfOnes()
165 else if (isEndChunk(Chunk)) in trySequenceOfOnes()
169 // Early exit in case we can't find a start/end chunk. in trySequenceOfOnes()
175 // Chunks between the start and end chunk need to have all their bits set. in trySequenceOfOnes()
193 const uint64_t Chunk = getChunk(UImm, Idx); in trySequenceOfOnes() local
195 // Check whether we are looking at a chunk which is not part of the in trySequenceOfOnes()
197 if ((Idx < StartIdx || EndIdx < Idx) && Chunk != Outside) { in trySequenceOfOnes()
206 // Check whether we are looking a chunk which is part of the contiguous in trySequenceOfOnes()
208 } else if (Idx > StartIdx && Idx < EndIdx && Chunk != Inside) { in trySequenceOfOnes()
410 // Early-exit if the big chunk couldn't be a power-of-two number of runs in tryEorOfLogicalImmediates()
542 const unsigned Chunk = (Imm >> Shift) & Mask; in expandMOVImm() local
543 if (Chunk == Mask) in expandMOVImm()
545 else if (Chunk == 0) in expandMOVImm()
580 // zero out the chunk which will be replaced, we fill the chunk which will in expandMOVImm()