[PATCH] D62662: [DAGCombine] ((A-c1)+c2) -> (A+(c2-c1)) constant-fold

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 07:14:16 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: RKSimon, spatel, craig.topper.
lebedev.ri added a project: LLVM.
Herald added a subscriber: javed.absar.
lebedev.ri added a parent revision: D62661: [DAGCombine] Use FoldConstantArithmetic() to perform ((c1-A)+c2) -> (c1+c2)-A fold.
lebedev.ri added a child revision: D62663: [DAGCombine] Use FoldConstantArithmetic() to perform C2-(A+C1) -> (C2-C1)-A fold.

This was the root cause of the endless combine loop in D62257 <https://reviews.llvm.org/D62257>

https://rise4fun.com/Alive/d3W


Repository:
  rL LLVM

https://reviews.llvm.org/D62662

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/vec_add.ll
  test/CodeGen/X86/vec_add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62662.202181.patch
Type: text/x-patch
Size: 6450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190530/5613d71c/attachment.bin>


More information about the llvm-commits mailing list