[all-commits] [llvm/llvm-project] ba9c6a: [NFC][InstCombine] Add tests for sinking `not` int...
Roman Lebedev via All-commits
all-commits at lists.llvm.org
Sun Dec 18 17:11:47 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ba9c6add4c9d9027871f93886ad999fce8db2f70
https://github.com/llvm/llvm-project/commit/ba9c6add4c9d9027871f93886ad999fce8db2f70
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2022-12-19 (Mon, 19 Dec 2022)
Changed paths:
A llvm/test/Transforms/InstCombine/sink-not-into-and.ll
A llvm/test/Transforms/InstCombine/sink-not-into-logical-and.ll
A llvm/test/Transforms/InstCombine/sink-not-into-logical-or.ll
A llvm/test/Transforms/InstCombine/sink-not-into-or.ll
Log Message:
-----------
[NFC][InstCombine] Add tests for sinking `not` into logical ops with hands with extra (but invertible) uses
Commit: b20ccccda22b1465b54bd069bd53a0a96224f3ec
https://github.com/llvm/llvm-project/commit/b20ccccda22b1465b54bd069bd53a0a96224f3ec
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2022-12-19 (Mon, 19 Dec 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/sink-not-into-and.ll
M llvm/test/Transforms/InstCombine/sink-not-into-logical-and.ll
M llvm/test/Transforms/InstCombine/sink-not-into-logical-or.ll
M llvm/test/Transforms/InstCombine/sink-not-into-or.ll
Log Message:
-----------
[InstCombine] Support sinking `not` into logical operand with invertible hands
The important bit here is that we gracefully handle other uses,
iff they can be adapted to inversion.
I'll note, the previous logic was actively bad,
it increased instruction count since it didn't actually ensure
that the inversions happened.
Compare: https://github.com/llvm/llvm-project/compare/fa5f77b16246...b20ccccda22b
More information about the All-commits
mailing list