[PATCH] D154522: [DAG] Improve combineCarryDiamond to accept (uaddo_carry X, 0, Carry)

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 09:30:45 PDT 2023


deadalnix created this revision.
deadalnix added reviewers: RKSimon, craig.topper, tstellar, barannikov88, t.p.northover, lebedev.ri, spatel, chfast.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
deadalnix requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

It turns out that `(uaddo X, Carry)` is tranformed into `(uaddo_carry X, 0, Carry)` whenever the carry is an actual carry. This defeats the pattern matched by `combineCarryDiamond` when the uaddo is combined before `combineCarryDiamond` had the chance to do its magic.

This is exhibited in D152928 <https://reviews.llvm.org/D152928> but I have not been able to reliably tirgger that error on main.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154522

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154522.537395.patch
Type: text/x-patch
Size: 4411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230705/42966717/attachment-0001.bin>


More information about the llvm-commits mailing list