[PATCH] D106139: [DAGCombine] Combine srX of add that intends to get the carry as uaddo

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 26 03:45:43 PDT 2021


abinavpp added a comment.

I moved this to the target independent DAG-combiner.

There is a regression in X86/addcarry.ll's d() function. I haven't looked into why we're getting 2 more instructions there, let me know if there's anything we can do in this patch to avoid it. I also added newer tests in X86/addcarry.ll that shows lesser instructions, i.e. the f() is 2 instructions less and g() is 3 instructions less with this transformation.

I have realized that this works for sra as well (https://alive2.llvm.org/ce/z/ZtGz-o), so I made the necessary changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106139/new/

https://reviews.llvm.org/D106139



More information about the llvm-commits mailing list