makina is a cell-based esolang composed of automata which move around a grid. These automata follow paths of instructions that direct their movement. Your task is to, given a makina program using only the below instructions (so a subset of normal makina) as input, output two distinct values depending on whether or not it is a loop. (If program flow comes to an arrow character that it has already visited then the program is a loop.)
^>v<These instructions (arrows) set the direction of the automaton to the direction they point in.
IThis instruction halts automata going up or down, but does nothing to ones going left or right.
HThis instruction halts automata going left or right, but does nothing to ones going up or down.
OThis instruction does nothing to the automaton, acting like a sort of 4-way intersection.
All other characters (including spaces) halt the automaton, as does exiting the bounds of the program. The automaton starts in the top-left corner going right. You may assume programs are padded by spaces to be rectangular. This is code-golf, so shortest answer wins!
OOOv H<<< v
>>>v v<I< H>^ >^
>>>>v v <<<
>v ^O< >^