[all-commits] [llvm/llvm-project] a67bd9: [ValueTracking] Add missing operand checks in `com...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Wed Dec 11 18:30:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a67bd94fdafce716b42e0cb5409ee451b20f1749
      https://github.com/llvm/llvm-project/commit/a67bd94fdafce716b42e0cb5409ee451b20f1749
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-12-12 (Thu, 12 Dec 2024)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstCombine/fpclass-from-dom-cond.ll

  Log Message:
  -----------
  [ValueTracking] Add missing operand checks in `computeKnownFPClassFromCond` (#119579)

After https://github.com/llvm/llvm-project/pull/118257, we may call
`computeKnownFPClassFromCond` with unrelated conditions. Then
miscompilations may occur due to a lack of operand checks.

This bug was introduced by
https://github.com/llvm/llvm-project/commit/d2404ea6ced5fce9442260bde08a02d607fdd50d
and https://github.com/llvm/llvm-project/pull/80740. However, the
miscompilation couldn't have happened before
https://github.com/llvm/llvm-project/pull/118257, because we only added
related conditions to `DomConditionCache/AssumptionCache`.

Fix the miscompilation reported in
https://github.com/llvm/llvm-project/pull/118257#issuecomment-2536182166.



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