summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
AgeCommit message (Expand)Author
2025-01-06[InstCombine] Handle commuted pattern for `((X s/ C1) << C2) + X` (#121737)Yingwei Zheng
2025-01-06[IRBuilder] Refactor FMF interface (#121657)Yingwei Zheng
2024-12-13PatternMatch: migrate to CmpPredicate (#118534)Ramkumar Ramachandra
2024-12-10[InstCombine] Fold `(X & C1) - (X & C2) --> X & (C1 ^ C2)` if `(C1 & C2) == C...fengfeng
2024-12-04[InstCombine] Fix use after freeNikita Popov
2024-12-04[InstCombine] Preserve nuw in OptimizePointerDifferenceNikita Popov
2024-12-01[InstCombine] Fold `umax(X, C) + -C` into `usub.sat(X, C)` (#118195)Yingwei Zheng
2024-11-25[PatternMatch] Introduce m_c_Select (#114328)David Green
2024-11-19[InstCombine] Fix APInt ctor assertionNikita Popov
2024-11-18[InstCombine] Re-queue users of phi when nsw/nuw flags of add are inferred (#...Yingwei Zheng
2024-11-15[InstCombine] fold `sub(zext(ptrtoint),zext(ptrtoint))` (#115369)Nikolay Panchenko
2024-10-11[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)Rahul Joshi
2024-08-27[InstCombine] Simplify `(add/sub (sub/add) (sub/add))` irrelivant of use-countNoah Goldstein
2024-08-21[InstCombine] Fold `sext(A < B) + zext(A > B)` into `ucmp/scmp(A, B)` (#103833)Volodymyr Vasylkun
2024-08-21[InstCombine] Remove some of the complexity-based canonicalization (#91185)Nikita Popov
2024-08-16[InstCombine] Preserve nsw in A + -B foldNikita Popov
2024-07-29[PatternMatch] Use `m_SpecificCmp` matchers. NFC. (#100878)Yingwei Zheng
2024-07-12[InstCombine] Fold (zext (X +nuw C)) + -C --> zext(X) when zext has additiona...Craig Topper
2024-06-08[InstCombine] Preserve the nsw/nuw flags for (X | Op01C) + Op1C --> X + (Op01...csstormq
2024-06-01[InstCombine] Fold `(add X, (sext/zext (icmp eq X, C)))`Noah Goldstein
2024-05-09[InstCombine] Handle more commuted cases in matchesSquareSum()Nikita Popov
2024-04-26[InstCombine] Fix use-after-free in OptimizePointerDifference()Nikita Popov
2024-04-26[InstCombine] Allow multi-use OptimizePointerDifference() with two GEPs (#90017)Nikita Popov
2024-04-25[InstCombine] Fold fneg over select (#89947)Yingwei Zheng
2024-04-24[InstCombine] Simplify `(X / C0) * C1 + (X % C0) * C2` to `(X / C0) * (C1 - C...Yingwei Zheng
2024-04-19[InstCombine] Regard zext nneg as sext when folding add(zext neg(add)) (#88887)ZelinMa557
2024-04-18[IR][PatternMatch] Only accept poison in getSplatValue() (#89159)Nikita Popov
2024-04-17[InstCombine] Don't use dominating conditions to transform sub into xor. (#88...Craig Topper
2024-04-16[ValueTracking] Restore isKnownNonZero parameter order. (#88873)Harald van Dijk
2024-04-12[ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (#85863)Yingwei Zheng
2024-03-26[LLVM] Remove nuw neg (#86295)Yingwei Zheng
2024-03-21[InstCombine] integrate `N{U,S}WAddLike` into existing foldsNoah Goldstein
2024-03-06[InstCombine] Add folds for `(fp_binop ({s|u}itofp x), ({s|u}itofp y))`Noah Goldstein
2024-03-06[InstCombine] Move folding `(add (sitofp x), (sitofp y))` impl to Instruction...Noah Goldstein
2024-02-26[InstCombine] Fold (sub (xor X, (sext C)), (sext C)) => (select C (neg X), X)...Kai Luo
2024-02-06[ValueTracking][NFC] Pass `SimplifyQuery` to `computeKnownFPClass` family (#8...Yingwei Zheng
2024-01-15[InstCombine] Add folds for `(add/sub/disjoint_or/icmp C, (ctpop (not x)))`Noah Goldstein
2024-01-10[InstCombine] Fold the `log2_ceil` idiom (#76661)Yingwei Zheng
2024-01-04[InstCombine] Refactor folding of commutative binops over select/phi/minmax (...Yingwei Zheng
2023-12-27[InstCombine] Use ConstantInt::getSigned to sign extend -2 for large types. (...Craig Topper
2023-12-06[InstCombine] Explicitly set disjoint flag when converting xor to or. (#74229)Craig Topper
2023-12-05[InstCombine] Use disjoint flag in add of or foldNikita Popov
2023-12-04[InstCombine] Add one-use limitation to box multiply fold (#72876)shaojingzhi
2023-11-30[InstCombine] Handle equality comparison when flooring by constant 2Antonio Frighetto
2023-11-27[InstCombine] Set disjoint flag when turning Add into Or. (#72702)Craig Topper
2023-11-20[InstCombine] Add transform for `~X + ~Y)` -> `-2 - Y - X`Noah Goldstein
2023-11-20[InstCombine] Replace `isFreeToInvert` + `CreateNot` with `getFreelyInverted`Noah Goldstein
2023-11-20[InstCombine] Make `isFreeToInvert` check recursively.Noah Goldstein
2023-11-20[InstCombine] Add folds for `(X + Y) - (W + Z)`Noah Goldstein
2023-11-20[InstCombine] Propagate NSW/NUW flags for `(X - Y) - Z -> X - (Y + Z)` (#72693)Yingwei Zheng