[PATCH] D53449: [X86] Remove SDIVREM8_SEXT_HREG/UDIVREM8_ZEXT_HREG and their associated DAG combine and target bits support. Use a post isel peephole instead.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 19 12:43:12 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

These nodes exist to overcome an isel problem where we can generate a zero extend of an AH register followed by an extract subreg, and another zero extend. The first zero extend exists to avoid a partial register update copying the AH register into the low 8-bits. The second zero extend exists if the user wanted the remainder zero extended.

To make this work we had a DAG combine to morph the DIVREM opcode to a special opcode that included the extend. But then we had to add the new node to computeKnownBits and computeNumSignBits to process the extension portion.

This patch instead removes all of that and adds a late peephole to detect the two extends.


https://reviews.llvm.org/D53449

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53449.170240.patch
Type: text/x-patch
Size: 8062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/8cc08948/attachment-0001.bin>


More information about the llvm-commits mailing list