[all-commits] [llvm/llvm-project] c7902d: [InstCombine] Add test for isKnownNonZero() undef ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Apr 14 21:54:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7902d87a5a050b816edfe99e7e093ae63f4e564
      https://github.com/llvm/llvm-project/commit/c7902d87a5a050b816edfe99e7e093ae63f4e564
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
    M llvm/test/Transforms/InstCombine/add.ll

  Log Message:
  -----------
  [InstCombine] Add test for isKnownNonZero() undef miscompile (NFC)


  Commit: 52a1998f15ab0e5b9ff7afa8b92cc714463d5dd8
      https://github.com/llvm/llvm-project/commit/52a1998f15ab0e5b9ff7afa8b92cc714463d5dd8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstCombine/add.ll
    M llvm/test/Transforms/InstSimplify/vec-cmp.ll

  Log Message:
  -----------
  [ValueTracking] Don't accept undef in isKnownNonZero()

As the undef can be replaced with a zero value, this is not legal
in the general case. We can only allow poison values. This matches
what the other ValueTracking helpers like computeKnownBits() do.


Compare: https://github.com/llvm/llvm-project/compare/f811d7b50957...52a1998f15ab

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