[llvm-bugs] [Bug 43251] New: [InstCombine] Failure to simplify usub.with.overflow+null check of non-null base pointer

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 8 11:32:31 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43251

            Bug ID: 43251
           Summary: [InstCombine] Failure to simplify
                    usub.with.overflow+null check of non-null base pointer
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

Again comes up in https://reviews.llvm.org/D67122
for 

char* test(char& base, unsigned long offset) {
  return &base - offset;
}

We produce 

https://godbolt.org/z/luGEju

and fail to simplify further, but we can:

https://rise4fun.com/Alive/Ppo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190908/a4739b56/attachment-0001.html>


More information about the llvm-bugs mailing list