Skip to content

Commit 5cf4967

Browse files
committed
Error on unsupported ops.
1 parent f3adb60 commit 5cf4967

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/compiler/intrinsics/core.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,13 +617,17 @@ function encode_reduce_body(cb, type, acc, elem, op::Symbol, ::Type{T}) where T
617617
encode_AddFOp!(cb, type, acc, elem)
618618
elseif op == :max
619619
encode_MaxFOp!(cb, type, acc, elem)
620+
else
621+
error("Unsupported float reduction operation: $op")
620622
end
621623
else # Integer
622624
signedness = T <: Signed ? SignednessSigned : SignednessUnsigned
623625
if op == :add
624626
encode_AddIOp!(cb, type, acc, elem)
625627
elseif op == :max
626628
encode_MaxIOp!(cb, type, acc, elem; signedness)
629+
else
630+
error("Unsupported integer reduction operation: $op")
627631
end
628632
end
629633
end

0 commit comments

Comments
 (0)