[PATCH] D28625: [InstCombine] try to shrink bitwise logic with phi operand

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 12:22:34 PST 2017


efriedma added a comment.

Err, sorry, it looks like my comment wasn't really clear about what I was thinking about...

The optimization sort of has two weaknesses in its current state: one the optimization doesn't work if the initial value isn't a constant.  Two, it only works if there's a single logical operation per loop iteration.  The first could probably be fixed using known bits; I'm more worried about the second one... it's probably not something we would deal with in instcombine.  Maybe that's not important.


https://reviews.llvm.org/D28625





More information about the llvm-commits mailing list