HomePhabricator

[PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.

Authored by koriakin on May 10 2016, 9:49 AM.

Description

[PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.

Currently, SelectionDAG assumes 8/16-bit cmpxchg returns either a sign
extended result, or a zero extended result. SystemZ takes a third
option by returning junk in the high bits (rotated contents of the other
bytes in the memory word). In that case, don't use Assert*ext, and
zero-extend the result ourselves if a comparison is needed.

Differential Revision: http://reviews.llvm.org/D19800

llvm-svn: 269075