]> granicus.if.org Git - llvm/commit
Re-commit r289955: [X86] Fold (setcc (cmp (atomic_load_add x, -C) C), COND) to (setcc...
authorHans Wennborg <hans@hanshq.net>
Wed, 11 Jan 2017 01:36:57 +0000 (01:36 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 11 Jan 2017 01:36:57 +0000 (01:36 +0000)
commit5811c15d6be769c45103ee1d3282d84d7dafca4d
treeb5bfd67b78e9c46e40515d9e80046dd2a8799055
parent91424c30232d542c28c445d9b6e27f9d4a86d3c9
Re-commit r289955: [X86] Fold (setcc (cmp (atomic_load_add x, -C) C), COND) to (setcc (LADD x, -C), COND) (PR31367)

This was reverted because it would miscompile code where the cmp had
multiple uses. That was due to a deficiency in the existing code, which
was fixed in r291630 (see the PR for details).

This re-commit includes an extra test for the kind of code that got
miscompiled: @test_sub_1_setcc_jcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291640 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/atomic-eflags-reuse.ll