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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 13:45:38 PDT 2017


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM.

Given that we're already calling computeKnownBits here, this seems ok. Is there a real motivating benchmark though? If so, I think you want to add a reduction of that, so we're less likely to lose it if/when there's a rewrite of instcombine.

Also, I commented on https://reviews.llvm.org/D38206 before I saw this patch, so this patch may make that comment moot. Although similar to this case, another test to check a less restricted version would be good if you've seen it in the real world.


https://reviews.llvm.org/D38195





More information about the llvm-commits mailing list