[PATCH] D102171: [InstSimplify] Constant fold cast expressions with no already folded ops

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 08:43:12 PDT 2021


bjope added a comment.

In D102171#2747954 <https://reviews.llvm.org/D102171#2747954>, @nikic wrote:

> This looks somewhat suspect to me. Why is it important that InstSimplify specifically handles this? For example, I would expect InstCombine to take care of this, as it does operand constant folding.

Yes, instcombine would do this simplification. That is how I figured out that ConstantFoldConstant actually would do the trick. One could of course argue about the usefulness. In this case I guess it was about phase ordering and that one couldn't dump the IR without running instcombine first. Kind of making bisecting and fuzzy testing of single passes a bit more complicated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102171



More information about the llvm-commits mailing list