[AArch64] Fix PRR33100.

This commit fixes a bug introduced in r301019 where optimizeLogicalImm
would replace a logical node's immediate operand that was CSE'd and
was also an operand of another node.

This commit fixes the bug by replacing the logical node instead of its
immediate operand.

rdar://problem/32295276

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303607 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed