mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Concrete SIMD.init(repeating:) and SIMD.init(lowHalf:highHalf:) optimizations (#81766)
WIP to add more overloads to optimize SIMD codegen on concrete types. Here we do: - init(repeating:) - init(lowHalf:highHalf:) These are always inlined, even in debug, since LLVM knows how to lower them to one or two instructions on the targets that we care about.
This commit is contained in:
@@ -72,6 +72,16 @@ def all_integer_types(word_bits):
|
||||
is_word=True, bits=word_bits,
|
||||
is_signed=is_signed)
|
||||
|
||||
def all_signed_types(word_bits):
|
||||
for bitwidth in _all_integer_type_bitwidths:
|
||||
yield SwiftIntegerType(
|
||||
is_word=False, bits=bitwidth,
|
||||
is_signed=True)
|
||||
|
||||
yield SwiftIntegerType(
|
||||
is_word=True, bits=word_bits,
|
||||
is_signed=True)
|
||||
|
||||
# 'truncatingBitPattern' initializer is defined if the conversion is truncating
|
||||
# on any platform that Swift supports.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user