[all-commits] [llvm/llvm-project] a391b4: [RISCV] Prevent constant hoisting for (and (shl X, ...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Nov 21 19:22:53 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a391b49ce8524ddb6283d6605544a354d187a9d4
      https://github.com/llvm/llvm-project/commit/a391b49ce8524ddb6283d6605544a354d187a9d4
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/test/Transforms/ConstantHoisting/RISCV/immediates.ll

  Log Message:
  -----------
  [RISCV] Prevent constant hoisting for (and (shl X, C), mask<<C)

If the immediate is a shifted mask, we will use a pair of shifts
and never materialize the immediate. Consider the immediate free.

Reviewed By: reames, luismarques

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




More information about the All-commits mailing list