[all-commits] [llvm/llvm-project] cbbd70: [RISCV] Only combine (or (GREVI x, shamt), x) -> G...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Nov 30 08:17:19 PST 2020


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

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp

  Log Message:
  -----------
  [RISCV] Only combine (or (GREVI x, shamt), x) -> GORCI if shamt is a power of 2.

GORCI performs an OR between each stage. So we need to ensure only
one stage is active before doing this combine.

Initial attempts at finding a test case for this failed due to
the order things get combined. It's most likely that we'll form
one stage of GREVI then combine to GORCI before the two stages of
GREVI are able to be formed and combined with each other to form
a multi stage GREVI.

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




More information about the All-commits mailing list