]> granicus.if.org Git - llvm/commit
Merging r327651:
authorTom Stellard <tstellar@redhat.com>
Mon, 9 Apr 2018 23:19:44 +0000 (23:19 +0000)
committerTom Stellard <tstellar@redhat.com>
Mon, 9 Apr 2018 23:19:44 +0000 (23:19 +0000)
commit9fa366d3c110cb81b8f21deba17f92cdbc86702c
tree67878ce3eefb51a35b0c7e5fdbd41c77a5217a29
parent7e48926daec357789a2ffc27c44a4ed4d789eab8
Merging r327651:

------------------------------------------------------------------------
r327651 | carrot | 2018-03-15 10:49:12 -0700 (Thu, 15 Mar 2018) | 9 lines

[PPC] Avoid non-simple MVT in STBRX optimization

PR35402 triggered this case. It bswap and stores a 48bit value, current STBRX optimization transforms it into STBRX. Unfortunately 48bit is not a simple MVT, there is no PPC instruction to support it, and it can't be automatically expanded by llvm, so caused a crash.

This patch detects the non-simple MVT and returns early.

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

------------------------------------------------------------------------

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