[PATCH] D60460: [SelectionDAG] Use KnownBits::computeForAddSub in SelectionDAG::computeKnownBits

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 08:47:43 PDT 2019


bjope updated this revision to Diff 194701.
bjope added a comment.

Updated to use a KnownBits::computeForAddCarry helper. I added a simple
implementation here, but the idea is to replace it by the improved version
from D60522 <https://reviews.llvm.org/D60522> instead (if we land that patch before this one).

Also added a TODO for computing known bits for the carry in ADDCARRY. If we do
not think it is worth the trouble I can remove the TODO again before landing
this.
It is probably more important to add known bits tracking for the non-carry
result produced SUBCARRY (as we can rewrite ADDCARRY into SUBCARRY which at
the moment results in losing info about known bits).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60460

Files:
  llvm/include/llvm/Support/KnownBits.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/Support/KnownBits.cpp
  llvm/test/CodeGen/X86/pr32282.ll
  llvm/test/CodeGen/X86/x32-va_start.ll
  llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60460.194701.patch
Type: text/x-patch
Size: 9963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190411/b9e43e3a/attachment-0001.bin>


More information about the llvm-commits mailing list