Skip to content

Commit 03834d9

Browse files
committed
Rational -> float, fixes #337
1 parent 26bdd26 commit 03834d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modeling/graphs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ function add_constant_compute!(ls::LoopSet, op::Operation, var::Symbol)::Operati
723723
op.node_type = constant
724724
instr = instruction(op)
725725
opparents = parents(op)
726-
if Base.sym_in(instr.instr, (:add_fast,:mul_fast,:sub_fast,:div_fast,:vfmadd_fast, :vfnmadd_fast, :vfmsub_fast, :vfnmsub_fast))
726+
if Base.sym_in(instr.instr, (:add_fast,:mul_fast,:sub_fast,:div_fast,:(//),:vfmadd_fast, :vfnmadd_fast, :vfmsub_fast, :vfnmsub_fast))
727727
getconstfailed, vals = getconstvalues(ls, opparents)
728728
if !getconstfailed
729729
f = instr.instr
@@ -737,7 +737,7 @@ function add_constant_compute!(ls::LoopSet, op::Operation, var::Symbol)::Operati
737737
elseif length(opparents) == 1
738738
return add_constant!(ls, - vals[1], 8)::Operation
739739
end
740-
elseif f === :div_fast
740+
elseif (f === :div_fast) || (f === :(//))
741741
if length(opparents) == 2
742742
return add_constant!(ls, vals[1] / vals[2], 8)::Operation
743743
end

0 commit comments

Comments
 (0)