[all-commits] [llvm/llvm-project] 0e322c: [InstCombine] Preserve nuw on sub of geps (PR44419)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Jan 11 02:01:25 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e322c8a1f20ab04ce4f6bc538846859707f2d69
      https://github.com/llvm/llvm-project/commit/0e322c8a1f20ab04ce4f6bc538846859707f2d69
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-01-11 (Sat, 11 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
    M llvm/test/Transforms/InstCombine/sub-gep.ll

  Log Message:
  -----------
  [InstCombine] Preserve nuw on sub of geps (PR44419)

Fix https://bugs.llvm.org/show_bug.cgi?id=44419 by preserving the
nuw on sub of geps. We only do this if the offset has a multiplication
as the final operation, as we can't be sure the operations is nuw
in the other cases without more thorough analysis.

Differential Revision: https://reviews.llvm.org/D72048




More information about the All-commits mailing list