[PATCH] D75543: [ConstantFolding] Always return something from ConstantFoldConstant

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 10:05:48 PST 2020


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineShifts.cpp:619
     // If we got a constantexpr back, try to simplify it with TD info.
+    // TODO: This is dubious, IRBuilder<TargetFolder> should already do this.
     if (auto *C = dyn_cast<Constant>(V))
----------------
efriedma wrote:
> Maybe this code was written before we were doing folding in IRBuilder?
That seems likely. I've double checked that this really does get folded without the call and dropped it in rG293d813020d7.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75543





More information about the llvm-commits mailing list