llvm-project/llvm/lib/Transforms
Sanjay Patel 0cfc651032 [InstCombine] ease use constraint in tryFactorization()
The stronger one-use checks prevented transforms like this:
(x * y) + x --> x * (y + 1)
(x * y) - x --> x * (y - 1)

https://alive2.llvm.org/ce/z/eMhvQa

This is one of the IR transforms suggested in issue #57255.

This should be better in IR because it removes a use of a
variable operand (we already fold the case with a constant
multiply operand).
The backend should be able to re-distribute the multiply if
that's better for the target.

Differential Revision: https://reviews.llvm.org/D132412
2022-08-24 12:10:54 -04:00
..
AggressiveInstCombine [AggressiveInstCombine] check sqrt operand to allow more libcall->intrinsic transforms 2022-07-27 11:36:13 -04:00
CFGuard [NFC] Fix warning 2022-08-23 20:50:37 -05:00
Coroutines [PowerPC][Coroutines] Add tail-call check with call information for coroutines 2022-08-21 22:20:40 -04:00
Hello
IPO Remove redundant initialization of Optional (NFC) 2022-08-20 21:18:28 -07:00
InstCombine [InstCombine] ease use constraint in tryFactorization() 2022-08-24 12:10:54 -04:00
Instrumentation [MSAN] Handle array alloca with non-i64 size specification 2022-08-24 03:24:21 +00:00
ObjCARC [Transforms] Qualify auto in range-based for loops (NFC) 2022-08-14 12:51:58 -07:00
Scalar [ADT] Deprecate is_splat and replace all uses with all_equal 2022-08-23 11:36:27 -04:00
Utils [LoopUtils] Remove unused Loop arg from addDiffRuntimeChecks (NFC). 2022-08-23 10:15:28 +01:00
Vectorize [LV] Replace fixed-order cost model with a SK_Splice shuffle 2022-08-24 13:00:32 +01:00
CMakeLists.txt