OSDN Git Service

[PowerPC] Don't combine to bswap store on 1-byte truncating store
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 20 Nov 2018 04:42:31 +0000 (04:42 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 20 Nov 2018 04:42:31 +0000 (04:42 +0000)
commit86787453a38d0568b29faa0f6b47534e2c2ec5e6
tree0af8f4ed0411199f9175d3a213d59e8b34a774a6
parent5018f6ea8fcd1c655d36a2ae1900e0ccee906b96
[PowerPC] Don't combine to bswap store on 1-byte truncating store

Turns out that there was no check for a store that truncates down
to a single byte when combining a (store (bswap...)) into a byte-swapping
store. This patch just adds that check.

Fixes https://bugs.llvm.org/show_bug.cgi?id=39478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347288 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/pr39478.ll [new file with mode: 0644]