[all-commits] [llvm/llvm-project] 7686d4: [ValueTracking] Handle returned attribute with mis...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 8 08:05:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7686d4951712468e354350b6d26aa70d052c8db4
      https://github.com/llvm/llvm-project/commit/7686d4951712468e354350b6d26aa70d052c8db4
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstSimplify/returned.ll

  Log Message:
  -----------
  [ValueTracking] Handle returned attribute with mismatched type

The returned attribute can be used when it is possible to
"losslessly bitcast" between the argument and return type,
including between two vector types.

computeKnownBits() would crash in this case, isKnownNonZero()
would potentially produce a miscompile.

Fixes https://github.com/llvm/llvm-project/issues/74722.




More information about the All-commits mailing list