[llvm] [InstCombine] Simplify `(add/sub (sub/add) (sub/add))` irrelivant of use-count (PR #105866)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 03:00:35 PDT 2024
================
@@ -585,6 +585,9 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
FPClassTest DemandedMask, KnownFPClass &Known,
unsigned Depth = 0);
+ /// Common transforms for add / disjoint or
+ Instruction *foldAddLike(BinaryOperator &I);
----------------
nikic wrote:
If we add this kind of API, I think it would be better to make the signature `Value *LHS, Value *RHS, bool NUW, bool NSW`.
https://github.com/llvm/llvm-project/pull/105866
More information about the llvm-commits
mailing list