[all-commits] [llvm/llvm-project] bd6033: [PowerPC] Materialize 34-bit constants with pli di...

Amy Kwan via All-commits all-commits at lists.llvm.org
Tue Apr 6 11:38:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd6033eca7be937a236401fdbbf414d6929a44e8
      https://github.com/llvm/llvm-project/commit/bd6033eca7be937a236401fdbbf414d6929a44e8
  Author: Amy Kwan <amy.kwan1 at ibm.com>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
    M llvm/test/CodeGen/PowerPC/p10-constants.ll

  Log Message:
  -----------
  [PowerPC] Materialize 34-bit constants with pli directly

Previously, 34-bit constants were materialized in selectI64Imm(), and we relied
on td pattern matching to instead produce a pli. This becomes problematic as
there is no guarantee that the 34-bit constant will reach the td pattern
selection for pli. It is also possible for other transformations (such as complex
bit permutations) to also produce and utilize the 34-bit constant materialized
through selectI64Imm().

This patch instead produces pli on Power10 directly whenever the constant fits
within 34-bits.

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




More information about the All-commits mailing list