[all-commits] [llvm/llvm-project] cab21d: [DAG] computeKnownBits - Move (most) ISD::SHL hand...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Nov 3 06:23:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cab21d4fa8c335e002df91ee4736fc05593ed23c
      https://github.com/llvm/llvm-project/commit/cab21d4fa8c335e002df91ee4736fc05593ed23c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/Support/KnownBits.cpp
    M llvm/test/CodeGen/PowerPC/pr44183.ll
    M llvm/test/CodeGen/X86/pr32282.ll

  Log Message:
  -----------
  [DAG] computeKnownBits - Move (most) ISD::SHL handling into KnownBits::shl

As discussed on D90527, we should be be trying to move shift handling functionality into KnownBits to avoid code duplication in SelectionDAG/GlobalISel/ValueTracking.

The refactor to use the KnownBits fixed/min/max constant helpers allows us to hit a couple of cases that we were missing before.

We still need the getValidMinimumShiftAmountConstant case as KnownBits doesn't handle per-element vector cases.




More information about the All-commits mailing list