[PATCH] D56096: Default lowering for experimental.widenable.condition

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 14:15:41 PST 2019


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

In D56096#1375179 <https://reviews.llvm.org/D56096#1375179>, @mkazantsev wrote:

> Because we might want to get rid of widenable conditions (and therefore of guards) not right before codegen, but earlier? For example, before vectorization to get rid of control flow inside a loop.


Max and I discussed offline.  We decided on a "let's do both" approach.  We want standard codegen to know how to lower guards, but we also want to be able to experiment easily with doing so earlier in the pipeline.

I've posted https://reviews.llvm.org/D56096 which does the same transform in CGP.  We could have just scheduled the extra pass, but doing so seemed slightly ugly when CGP would be obviously the right place for this if we didn't also want the option to lower early.

Given that, LGTM.



================
Comment at: lib/Transforms/Scalar/LowerWidenableCondition.cpp:65
+  return true;
+}
+
----------------
At some point down the line, we'll probably want to simplify the CFG here, but that's definitely okay to be a followup.  


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56096/new/

https://reviews.llvm.org/D56096





More information about the llvm-commits mailing list