[PATCH] D65143: [InstCombine] Fold '(-1 u/ %x) u< %y' to '@llvm.umul.with.overflow' + overflow bit extraction
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 08:06:43 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3351
+
+ // Are we checking that overflow does not happen, or does happen?
+ switch (Pred) {
----------------
xbolva00 wrote:
> “.. whether overflow happens or not” ?
Non-native english here, i think the current variant is more correct.
We obviously are checking whether or not the overflow happens,
so the suggested comment isn't wrong.
But the question here is whether we are asking "if this overflows return 1 else return 0"
or "if this overflows return 0 else return 1", and i wouldn't say i'd infer it from suggested wording.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65143/new/
https://reviews.llvm.org/D65143
More information about the llvm-commits
mailing list