Skip to content
Commit f7ab70cf authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[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.
parent 24d52181
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment