Displaying 1 result from an estimated 1 matches for "cmp22".
Did you mean:
cmp2
2017 May 19
4
memcmp code fragment
...%idxprom13 = zext i32 %inc10 to i64
%arrayidx14 = getelementptr inbounds i8, i8* %block, i64 %idxprom13
%3 = load i8, i8* %arrayidx14, align 1
%cmp17 = icmp eq i8 %2, %3
br i1 %cmp17, label %if.end25, label %if.then19
if.then19: ; preds = %if.end
%cmp22 = icmp ugt i8 %2, %3
br label %return
..
..
<repeats 12 times>
This code sequence can be collapsed into call to memcmp and we can get rid
of basic blocks. I have written a small peephole optimization for squenece
of instructions that identifies
branch termiantor, compare, load, gep etc a...