commit | c820ddf2efba7e45cb1ee2637a63054e6ece447c | [log] [tgz] |
---|---|---|
author | Jan Voung <jvoung@chromium.org> | Tue Jul 29 14:38:51 2014 -0700 |
committer | Jan Voung <jvoung@chromium.org> | Tue Jul 29 14:38:51 2014 -0700 |
tree | c55c502f5c491d706df987cadc4c0fcec91dbb8d | |
parent | 839c4cea9facd5bdc51b027bfb89ad778f06fc39 [diff] |
Add 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 Review URL: https://codereview.chromium.org/413903002