[PATCH] D138814: [InstCombine] Combine a/lshr of add -> uadd.with.overflow

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 05:22:39 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:911-912
+  if (!Op0->hasOneUse()) {
+    Value *WideOV = Builder.CreateZExt(UAdd, Op0->getType());
+    replaceInstUsesWith(*Op0, WideOV);
+  }
----------------
Right, not an overflow bit. Probably adjust the name too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138814



More information about the llvm-commits mailing list