[PATCH] D72048: [InstCombine] Preserve nuw on sub of geps (PR44419)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 02:23:14 PST 2020


nikic created this revision.
nikic added reviewers: spatel, lebedev.ri, RKSimon.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Fix https://bugs.llvm.org/show_bug.cgi?id=44419 by preserving the nuw on sub of geps. We only do this for the simple case where we have one non-swapped gep. We could also preserve some information for the two gep case, but this would be more complicated.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72048

Files:
  llvm/include/llvm/Analysis/Utils/Local.h
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/sub-gep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72048.235749.patch
Type: text/x-patch
Size: 6239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200101/dd607539/attachment.bin>


More information about the llvm-commits mailing list