[SystemZ] Directly use CC result of compare-and-swap
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 19 Jan 2018 20:54:18 +0000 (20:54 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 19 Jan 2018 20:54:18 +0000 (20:54 +0000)
commit31112895d966ccd5a3098866f0826a789d36f3b7
tree1fbcdf415c5465ee28b3f6522e873e95f4918ae1
parent849a59fd4b15967672f94fe034a0b152833b6320
[SystemZ] Directly use CC result of compare-and-swap

In order to implement a test whether a compare-and-swap succeeded, the
SystemZ back-end currently emits a rather inefficient sequence of first
converting the CC result into an integer, and then testing that integer
against zero.  This commit changes the back-end to simply directly test
the CC value set by the compare-and-swap instruction.

llvm-svn: 322988
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.h
llvm/test/CodeGen/SystemZ/cmpxchg-01.ll
llvm/test/CodeGen/SystemZ/cmpxchg-02.ll
llvm/test/CodeGen/SystemZ/cmpxchg-03.ll
llvm/test/CodeGen/SystemZ/cmpxchg-04.ll
llvm/test/CodeGen/SystemZ/cmpxchg-06.ll