[PATCH] D38195: [InstCombine] Move an optimization from foldICmpAndConstConst to foldICmpUsingKnownBits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 13:54:37 PDT 2017


craig.topper added a comment.

This didn't come from any real benchmark. The one use restriction on foldICmpAndShift was something I saw in real code. Though it was with a ashr, so I still have another patch to come. Then while I was reviewing the nearby code I saw the missing inverse case on this transform which I fixed last week in https://reviews.llvm.org/D38065. But then I started thinking about it more and thought maybe we should handle any kind of zeros and not just zeros created by ands.


https://reviews.llvm.org/D38195





More information about the llvm-commits mailing list