[PATCH] D26098: [SelectionDAG] Fix a crash visiting `AND` nodes

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 14:16:38 PDT 2016


hfinkel added a comment.

In https://reviews.llvm.org/D26098#582458, @escha wrote:

> Might it be better to just bail if ShiftBits is zero? This seems like a classic case of "trying to optimize a node that itself is going to disappear when it gets combine()'d", so maybe we should just not do this "optimization" if the shift is no shift at all.


I agree. Performing this transformation won't make it any easier to get rid of the zero shift (and if it does, it shouldn't).


https://reviews.llvm.org/D26098





More information about the llvm-commits mailing list