[PowerPC] Handle constant zero bits in BitPermutationSelector
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 10 Jan 2020 15:55:19 +0000 (09:55 -0600)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 10 Jan 2020 15:55:34 +0000 (09:55 -0600)
commitd864d93496c5fd0cc473953ab825f07e3d4c4e86
tree20faf12136b181d7749ff04c3336b7755d6aad8b
parentcdd05f2aea3b950a4e2c496175117e6b47b2a050
[PowerPC] Handle constant zero bits in BitPermutationSelector

We currently crash when analyzing an AssertZExt node that has some bits that are
constant zeros (i.e. as a result of an and with a constant).

This issue was reported in https://bugs.llvm.org/show_bug.cgi?id=41088 and this
patch fixes that.

Differential revision: https://reviews.llvm.org/D72038
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/test/CodeGen/PowerPC/pr41088.ll [new file with mode: 0644]