[PATCH] D59211: [LSR] Check for signed overflow in NarrowSearchSpaceByDetectingSupersets.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 11:19:23 PDT 2019


efriedma added a comment.

It looks like LSR doesn't deal with this sort of issue consistently... some places we try to overflow-check arithmetic on the offset, and others we use wrapping arithmetic.

What should happen, really, is that each formula includes a bitwidth, and all arithmetic involving that formula use arithmetic that wraps at that bitwidth (like an APInt).  Otherwise it's not really clear what the computation actually means.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59211





More information about the llvm-commits mailing list