Skip to content
Snippets Groups Projects

Draft: Fused-multiply-add vectorization

Open Michael Kuron requested to merge fma into master
Files
8
@@ -38,6 +38,8 @@ def get_vector_instruction_set_arm(data_type='double', instruction_set='neon'):
'-': 'sub[0, 1]',
'*': 'mul[0, 1]',
'/': 'div[0, 1]',
'*+': 'fma[2, 1, 0]', # 2*1+0
'-*+': 'fms[2, 1, 0]', # -(2*1+0)
'sqrt': 'sqrt[0]',
'loadU': 'ld1[0]',
@@ -68,6 +70,10 @@ def get_vector_instruction_set_arm(data_type='double', instruction_set='neon'):
result['bytes'] = bitwidth // 8
if instruction_set.startswith('sve') or instruction_set == 'sme':
base_names['stream'] = 'stnt1[0, 1]'
base_names['*+'] = 'mad[2, 1, 0]'
base_names['*-'] = 'msb[2, 1, 0]'
base_names['-*+'] = 'nmad[2, 1, 0]'
base_names['-*-'] = 'nmsb[2, 1, 0]'
prefix = 'sv'
suffix = f'_f{bits[data_type]}'
elif instruction_set == 'neon':
Loading