Skip to content
Snippets Groups Projects
Commit 6c7492ee authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Fix AST cloning in loop vectorizer. Add missing docstring.

parent a7df817e
No related branches found
No related tags found
1 merge request!424Vectorization: Infrastructure and Base Implementation for x86
Pipeline #70091 passed
...@@ -50,6 +50,8 @@ class PsVecMemAcc(PsExpression, PsLvalue, PsVectorOp): ...@@ -50,6 +50,8 @@ class PsVecMemAcc(PsExpression, PsLvalue, PsVectorOp):
offset: Offset inside the memory region offset: Offset inside the memory region
vector_entries: Number of elements to access vector_entries: Number of elements to access
stride: Optional integer step size for strided access, or ``None`` for contiguous access stride: Optional integer step size for strided access, or ``None`` for contiguous access
aligned: For contiguous accesses, whether the access is guaranteed to be naturally aligned
according to the vector data type
""" """
__match_args__ = ("pointer", "offset", "vector_entries", "stride", "aligned") __match_args__ = ("pointer", "offset", "vector_entries", "stride", "aligned")
......
...@@ -187,13 +187,13 @@ class LoopVectorizer: ...@@ -187,13 +187,13 @@ class LoopVectorizer:
trailing_ctr = self._ctx.duplicate_symbol(scalar_ctr) trailing_ctr = self._ctx.duplicate_symbol(scalar_ctr)
trailing_loop_body = substitute_symbols( trailing_loop_body = substitute_symbols(
loop.body, {scalar_ctr: PsExpression.make(trailing_ctr)} loop.body.clone(), {scalar_ctr: PsExpression.make(trailing_ctr)}
) )
trailing_loop = PsLoop( trailing_loop = PsLoop(
PsExpression.make(trailing_ctr), PsExpression.make(trailing_ctr),
PsExpression.make(trailing_start), PsExpression.make(trailing_start),
loop.stop, loop.stop.clone(),
loop.step, loop.step.clone(),
trailing_loop_body, trailing_loop_body,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment