[PATCH] D48278: [SelectionDAG] Fold redundant masking operations of shifted value

Diogo N. Sampaio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 06:59:20 PDT 2018


dnsampaio updated this revision to Diff 155375.
dnsampaio marked 2 inline comments as done.
dnsampaio added a comment.

Only accepts instructions with 2 uses (AND / SHIFT operations). So that looping through the uses is not expensive, and we avoid it in most cases.
Removed recursive bit value computations(computeKnownBits).


https://reviews.llvm.org/D48278

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/FoldRedundantShiftedMasking.ll
  test/CodeGen/ARM/FoldRedundantShiftedMasking.ll
  test/CodeGen/X86/FoldRedundantShiftedMasking.roll.ll
  test/CodeGen/X86/pr32329.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48278.155375.patch
Type: text/x-patch
Size: 13300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180713/fd70b38f/attachment.bin>


More information about the llvm-commits mailing list