Skip to content
Snippets Groups Projects
Commit df7c6e75 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Fix storeAAndFlushCacheline when multiple assignments are in the same scope

parent 040040c7
No related branches found
No related tags found
1 merge request!300Fix nontemporal stores on non-x86 for fields with variable size
Pipeline #43082 passed
......@@ -339,7 +339,9 @@ class CBackend:
ptr, self.sympy_printer.doprint(rhs), **self._kwargs) + ';'
code = f"{code}\nif ({flushcond}) {{\n\t{code2}\n}}"
elif nontemporal and 'storeAAndFlushCacheline' in self._vector_instruction_set:
tmpvar = '_tmp_' + hashlib.sha1(self.sympy_printer.doprint(rhs).encode('ascii')).hexdigest()[:8]
lhs_hash = hashlib.sha1(self.sympy_printer.doprint(node.lhs).encode('ascii')).hexdigest()[:8]
rhs_hash = hashlib.sha1(self.sympy_printer.doprint(rhs).encode('ascii')).hexdigest()[:8]
tmpvar = f'_tmp_{lhs_hash}_{rhs_hash}'
code = 'const ' + self._print(node.lhs.dtype).replace(' const', '') + ' ' + tmpvar + ' = ' \
+ self.sympy_printer.doprint(rhs) + ';'
code1 = self._vector_instruction_set[instr].format(ptr, tmpvar, printed_mask, **self._kwargs) + ';'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment