[PPC] Do not emit extswsli in 32BIT mode when using -mcpu=pwr9
authorZarko Todorovski <zarko@ca.ibm.com>
Wed, 30 Sep 2020 15:03:03 +0000 (11:03 -0400)
committerZarko Todorovski <zarko@ca.ibm.com>
Wed, 30 Sep 2020 15:06:20 +0000 (11:06 -0400)
commit052c5bf40a9fc9ffe1bb2669763d8a0d2dea2b2e
treeff06d15a20422f30ea706617d811703bddd75a24
parent2c394bd4071d32000e2eed0f7d90fe7c576d7050
[PPC] Do not emit extswsli in 32BIT mode when using -mcpu=pwr9

It looks like in some circumstances when compiling with `-mcpu=pwr9` we create an EXTSWSLI node when which causes llc to fail. No such error occurs in pwr8 or lower.

This occurs in 32BIT AIX and BE Linux. the cause seems to be that the default return in combineSHL is to create an EXTSWSLI node.  Adding a check for whether we are in PPC64 before that fixes the issue.

Reviewed By: #powerpc, nemanjai

Differential Revision: https://reviews.llvm.org/D87046
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/ppc-32bit-shift.ll [new file with mode: 0644]