[PowerPC] Fix SH field overflow issue
authorYi-Hong Lyu <Yi-Hong.Lyu@ibm.com>
Wed, 2 Oct 2019 20:25:16 +0000 (20:25 +0000)
committerYi-Hong Lyu <Yi-Hong.Lyu@ibm.com>
Wed, 2 Oct 2019 20:25:16 +0000 (20:25 +0000)
commit92aeda089b49b1e15955b4eca715b67b28dd43bd
tree1e9af2ac5bcc96238b6d6d36bb5db4bbc35ea914
parentc9f1b7f4c3cbfd7628a2069f57a2e9a9888e79ec
[PowerPC] Fix SH field overflow issue

Store rlwinm Rx, Ry, 32, 0, 31 as rlwinm Rx, Ry, 0, 0, 31 and store
rldicl Rx, Ry, 64, 0 as rldicl Rx, Ry, 0, 0. Otherwise SH field is overflow and
fails assertion in assembly printing stage.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373519 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
test/CodeGen/PowerPC/sh-overflow.mir [new file with mode: 0644]