[all-commits] [llvm/llvm-project] e63902: [InstCombine] Add baseline tests for nsw/nuw (NFC)

Eric Gullufsen via All-commits all-commits at lists.llvm.org
Wed Apr 5 07:13:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e63902128f8800b231d22aea88a9d3f38eecd172
      https://github.com/llvm/llvm-project/commit/e63902128f8800b231d22aea88a9d3f38eecd172
  Author: Eric Gullufsen <ericgullufsen at gmail.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/and-xor-or.ll

  Log Message:
  -----------
  [InstCombine] Add baseline tests for nsw/nuw (NFC)

nsw/nuw flags are currently not preserved when canonicalizing,
adding baseline tests here and subsequent patch will fix.

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


  Commit: b9bbe2f6037df707372de157e65cc06255673b19
      https://github.com/llvm/llvm-project/commit/b9bbe2f6037df707372de157e65cc06255673b19
  Author: Eric Gullufsen <ericgullufsen at gmail.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/test/Transforms/InstCombine/and-xor-or.ll

  Log Message:
  -----------
  [InstCombine] Preserve nsw/nuw flags in canonicalization

canonicalizeLogicFirst reorders logic op / math op for suitable
constants, and this commit makes this function pass through
nsw/nuw flags on the Add.

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


Compare: https://github.com/llvm/llvm-project/compare/2f21659ee9c2...b9bbe2f6037d


More information about the All-commits mailing list