]> granicus.if.org Git - llvm/commit
[InstCombine] Simplify selects that test cmpxchg instructions
authorMatthew Simpson <mssimpso@codeaurora.org>
Tue, 31 Oct 2017 12:34:02 +0000 (12:34 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Tue, 31 Oct 2017 12:34:02 +0000 (12:34 +0000)
commit4f7d658ee00eb05abef86f1f99431dd49f2feaa4
tree9454d3a6bc008c497864690d62bdd3bf0ee5f6bd
parent7b6f7521ee81130feb692eae172b4432c50f42d7
[InstCombine] Simplify selects that test cmpxchg instructions

If a select instruction tests the returned flag of a cmpxchg instruction and
selects between the returned value of the cmpxchg instruction and its compare
operand, the result of the select will always be equal to its false value.

Differential Revision: https://reviews.llvm.org/D39383

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316994 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/select-cmpxchg.ll [new file with mode: 0644]