[PATCH] D65143: [InstCombine] Fold '(-1 u/ %x) u< %y' to '@llvm.umul.with.overflow' + overflow bit extraction
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 07:16:42 PDT 2019
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3333
+/// (-1 u/ %x) u< %y
+/// to
+/// @llvm.umul.with.overflow(%x, %y) plus extraction of overflow bit
----------------
Just ‘x’ instead of ‘%x’ in the comments?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3351
+
+ // Are we checking that overflow does not happen, or does happen?
+ switch (Pred) {
----------------
“.. whether overflow happens or not” ?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3363
+ } else
+ return nullptr;
+
----------------
Early return maybe better?
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