[all-commits] [llvm/llvm-project] 24bfa2: [SelectionDAGBuilder] Simplify visitShift. NFC

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Feb 19 12:41:20 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 24bfa243551034bf949772146bdf27b14ce9674a
      https://github.com/llvm/llvm-project/commit/24bfa243551034bf949772146bdf27b14ce9674a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-02-19 (Sat, 19 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

  Log Message:
  -----------
  [SelectionDAGBuilder] Simplify visitShift. NFC

This code was detecting whether the value returned by getShiftAmountTy
can represent all shift amounts. If not, it would use MVT::i32 as a
placeholder. getShiftAmountTy was updated last year to return i32
if the type returned by the target couldn't represent all values.

This means the MVT::i32 case here is dead and can the logic can
be simplified.

Reviewed By: RKSimon

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




More information about the All-commits mailing list