[PATCH] D52504: [DAGCombiner] Div/rem folds
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 25 09:46:15 PDT 2018
xbolva00 added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3112
// division-by-zero or remainder-by-zero, so assume the divisor is 1.
// Similarly, if we're zero-extending a boolean divisor, then assume it's a 1.
----------------
RKSimon wrote:
> You're ignoring this comment - consult simplifyDivRem inside InstructionSimplify.cpp which shows the issue
Seems like we don't even need the X /, % 1 -> X fold here. With or without - tests are not affected, this was folded even before this patch.
https://reviews.llvm.org/D52504
More information about the llvm-commits
mailing list