[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
Tue Aug 27 05:15:57 PDT 2024
================
@@ -2008,6 +2008,24 @@ static bool shouldMergeGEPs(GEPOperator &GEP, GEPOperator &Src) {
return true;
}
+Instruction *InstCombinerImpl::foldAddLikeCommutative(Value *LHS, Value *RHS,
+ bool NSW, bool NUW) {
----------------
nikic wrote:
Please move this into InstCombineAddSub.cpp. It will make it easier to move folds if necessary.
https://github.com/llvm/llvm-project/pull/105866
More information about the llvm-commits
mailing list