[all-commits] [llvm/llvm-project] caa225: [LLVM] Remove nuw neg (#86295)

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Tue Mar 26 05:56:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: caa225825075237cd6b15757476dd1999bec290b
      https://github.com/llvm/llvm-project/commit/caa225825075237cd6b15757476dd1999bec290b
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/include/llvm-c/Core.h
    M llvm/include/llvm/IR/Constants.h
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/IR/Core.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
    M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

  Log Message:
  -----------
  [LLVM] Remove nuw neg (#86295)

This patch removes APIs that creating NUW neg. It is a trivial case
because `sub nuw 0, X` always gets simplified into zero.
I believe there is no optimization opportunities in the real-world
applications that we can take advantage of the nuw flag.

Motivated by
https://github.com/llvm/llvm-project/pull/84792#discussion_r1524891134.

Compile-time improvement:
https://llvm-compile-time-tracker.com/compare.php?from=d1f182c895728d89c5c3d198b133e212a5d9d4a3&to=da7b7478b7cbb32c09d760f6b8d0e67901e0d533&stat=instructions:u



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list