[PATCH] D40721: [InstSimplify] Run constant folding if no other simplifications were possible
Igor Laevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 04:16:54 PST 2017
igor-laevsky added a comment.
Hi Sanjay,
Adding `ConstantFoldInsertElementInstruction` doesn't solve the problem I encountered after https://reviews.llvm.org/D40650. For the test `Transforms/InstSimplify/pr28725.ll` we need to run full `ConstantFoldInstruction` because it additionally folds instruction operands.
This change indeed causes constant folding to be called twice in some cases. But it's not a total waste - second time we will fold instruction operands and potentially simplify more. In the end I would expect that we will be able to remove all specific constant fold invokations in favor of this single call (providing it will not impact compile time).
https://reviews.llvm.org/D40721
More information about the llvm-commits
mailing list