[all-commits] [llvm/llvm-project] e3cf33: [InstCombine] Fix miscompilation in sinkNotIntoOth...

Andreas Jonson via All-commits all-commits at lists.llvm.org
Mon Sep 28 07:06:21 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3cf33561946626500b3a3684430ce5da61d2882
      https://github.com/llvm/llvm-project/commit/e3cf33561946626500b3a3684430ce5da61d2882
  Author: Andreas Jonson <andjo403 at hotmail.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    A llvm/test/Transforms/InstCombine/pr226504-commuted.ll
    A llvm/test/Transforms/InstCombine/pr226504.ll

  Log Message:
  -----------
  [InstCombine] Fix miscompilation in sinkNotIntoOtherHandOfLogicalOp (#226783)

Consider the following: `or X, (not (not X))`
sinkNotIntoOtherHandOfLogicalOp calls `freelyInvert(X)` but as X is used
in the not this call result in the new instruction is `and (not X), (not
(not X)) -> and (not X), X` instead of the expected `and (not X), (not
X)`

fixes https://github.com/llvm/llvm-project/issues/226504



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