OSDN Git Service

[SystemZ] Fix truncstore + bswap codegen bug
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 19 Sep 2017 20:50:05 +0000 (20:50 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 19 Sep 2017 20:50:05 +0000 (20:50 +0000)
commit5994e167a78be1204d127a7835eb2e38245b614b
tree75c9aa142ab4b088b9b3914a510e53f8243875df
parent3a6eaef3ccd5810e72dd520c98bb1c609f8a525b
[SystemZ] Fix truncstore + bswap codegen bug

SystemZTargetLowering::combineSTORE contains code to transform a
combination of STORE + BSWAP into a STRV type instruction.

This transformation is correct for regular stores, but not for
truncating stores.  The routine neglected to check for that case.

Fixes a miscompilation of llvm-objcopy with clang, which caused
test suite failures in the SystemZ multistage build bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313669 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/bswap-08.ll [new file with mode: 0644]