Skip to content
Snippets Groups Projects
Commit 2f343708 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fix lhs/rhs reversal typo, allow vectorizing 'vector = scalar'

parent 5608ba23
No related branches found
No related tags found
No related merge requests found
......@@ -96,12 +96,12 @@ def generate_expr_instruction_code(kernel, insn, codegen_state):
vinfo = codegen_state.vectorization_info
vcheck = VectorizabilityChecker(
kernel, vinfo.iname, vinfo.length)
rhs_is_vector = vcheck(insn.assignee)
lhs_is_vector = vcheck(insn.expression)
lhs_is_vector = vcheck(insn.assignee)
rhs_is_vector = vcheck(insn.expression)
if lhs_is_vector != rhs_is_vector:
if not lhs_is_vector and rhs_is_vector:
raise Unvectorizable(
"LHS and RHS disagree on whether they are vectors")
"LHS is scalar, RHS is vector, cannot assign")
is_vector = lhs_is_vector
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment