[all-commits] [llvm/llvm-project] 24d521: [InstCombine] add tests for add with not-of-mul co...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Wed Aug 24 13:03:52 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24d521815f6cf34944b0f6d3fa1acd1a881737f6
https://github.com/llvm/llvm-project/commit/24d521815f6cf34944b0f6d3fa1acd1a881737f6
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-08-24 (Wed, 24 Aug 2022)
Changed paths:
M llvm/test/Transforms/InstCombine/add.ll
Log Message:
-----------
[InstCombine] add tests for add with not-of-mul common operand; NFC
Negator can create non-obvious math while trying hard to avoid subtraction.
issue #57255
Commit: f7ab70cf8df6117312a2b76588269b9a1269a620
https://github.com/llvm/llvm-project/commit/f7ab70cf8df6117312a2b76588269b9a1269a620
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-08-24 (Wed, 24 Aug 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/add.ll
Log Message:
-----------
[InstCombine] reduce disguised mul+add factorization
~(A * C1) + A --> (A * (1 - C1)) - 1
This is a non-obvious mix of bitwise logic and math:
https://alive2.llvm.org/ce/z/U7ACVT
The pattern may be produced by Negator from the more typical
code seen in issue #57255.
Compare: https://github.com/llvm/llvm-project/compare/2c29268bfcc8...f7ab70cf8df6
More information about the All-commits
mailing list