Skip to content

Commit cf0a50e

Browse files
committed
No need to match and unroll comparison operator type in LoopUnrolling
It should always be int.
1 parent 95e136b commit cf0a50e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/loopUnrolling.ml

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ let containsInstructions stmt =
134134
true
135135

136136
let isCompare = function
137-
| Lt | Gt | Le | Ge | Ne -> true (*an loop that test for equality can not be of the type we look for*)
137+
| Lt | Gt | Le | Ge | Ne -> true (* an loop that test for equality can not be of the type we look for*)
138138
| _ -> false
139139

140140
let loopBody loopStatement = match loopStatement.skind with
@@ -260,8 +260,8 @@ let findLoopVarAndGoal loopStatement func (op, exp1, exp2) =
260260
end;
261261
| _ -> None
262262

263-
let getLoopVar loopStatement func = function (* TODO: unrolltype? *)
264-
| BinOp (op, exp1, exp2, TInt _) when isCompare op -> findLoopVarAndGoal loopStatement func (op, exp1, exp2)
263+
let getLoopVar loopStatement func = function
264+
| BinOp (op, exp1, exp2, _) when isCompare op -> findLoopVarAndGoal loopStatement func (op, exp1, exp2)
265265
| _ -> None
266266

267267
let getsPointedAt var func =

0 commit comments

Comments
 (0)