DescriptionAdd a peephole to fuse cmpxchg w/ later cmp+branch.
The cmpxchg instruction already sets ZF for comparing the return value
vs the expected value. So there is no need to compare eq again.
Lots of pexes-in-the-wild have this pattern. Some compare against
a constant, some compare against a variable.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3882
R=stichnot@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=c820ddf
Patch Set 1 #Patch Set 2 : split the test, formatting too #Patch Set 3 : bail out of om1 more quickly #
Total comments: 5
Patch Set 4 : add comment #Patch Set 5 : blank #
Messages
Total messages: 5 (0 generated)
|