Fix several bugs in 'op x, imm' handling. Foremost is that we now emit
authorChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2004 07:30:20 +0000 (07:30 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2004 07:30:20 +0000 (07:30 +0000)
commit0284628e8eee8a68263ff06f586e6171b2ecbce7
tree7e97f42ef0f669b8d74c29aa69626abbf44dd82b
parenta7a5cc889c9c5bc4f70ef40d87fce365c042a3a2
Fix several bugs in 'op x, imm' handling.  Foremost is that we now emit

   addi r3, r3, -1
instead of
   addi r3, r3, 1

for 'sub int X, 1'.

Secondarily, this fixes several cases where we could crash given an unsigned
constant.  And fixes a couple of minor missed optimization cases, such as
xor X, ~0U -> not X

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18379 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPC32ISelSimple.cpp