[all-commits] [llvm/llvm-project] e5ef52: [X86] Add tests for D87883. NFC

topperc via All-commits all-commits at lists.llvm.org
Mon Sep 28 14:36:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e5ef523ee46895ab5c75260b420d608f08002d97
      https://github.com/llvm/llvm-project/commit/e5ef523ee46895ab5c75260b420d608f08002d97
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-09-28 (Mon, 28 Sep 2020)

  Changed paths:
    M llvm/test/CodeGen/X86/bmi2.ll

  Log Message:
  -----------
  [X86] Add tests for D87883. NFC


  Commit: e53196b1e862902c74d83f0ce6f3578b1326f23d
      https://github.com/llvm/llvm-project/commit/e53196b1e862902c74d83f0ce6f3578b1326f23d
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-09-28 (Mon, 28 Sep 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/bmi2-x86_64.ll
    M llvm/test/CodeGen/X86/bmi2.ll

  Log Message:
  -----------
  [X86] Add support for calling SimplifyDemandedBits on the input of PDEP with a constant mask.

We can do several optimizations for PDEP using computeKnownBits and SimplifyDemandedBits

-If the MSBs of the output aren't demanded, those MSBs of the mask input aren't demanded either. We need to keep the most significant demanded bit of the mask and any mask bits before it.
-The number of possible ones in the mask determines how many bits of the lsbs of the other operand are demanded. Any bits of the mask we don't demand by the previous rule should not be counted.
-The result will have zeros in any position that the mask is zero.
-Since non-mask input bits can only be output in the original position or a higher bit position, the result will have at least as many trailing zeroes as the non-mask input.

Differential Revision: https://reviews.llvm.org/D87883


Compare: https://github.com/llvm/llvm-project/compare/082321909e51...e53196b1e862


More information about the All-commits mailing list