[all-commits] [llvm/llvm-project] 7ab05d: [PowerPC] fold addi's imm operand to its imm form ...

Chen Zheng via All-commits all-commits at lists.llvm.org
Tue Jun 23 03:28:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ab05d9a60b00556fc3510f1695648dfbd8c457e
      https://github.com/llvm/llvm-project/commit/7ab05d9a60b00556fc3510f1695648dfbd8c457e
  Author: Chen Zheng <czhengsz at cn.ibm.com>
  Date:   2020-06-23 (Tue, 23 Jun 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
    M llvm/lib/Target/PowerPC/PPCInstrInfo.h
    A llvm/test/CodeGen/PowerPC/convert-ri-addi-to-ri.mir

  Log Message:
  -----------
  [PowerPC] fold addi's imm operand to its imm form consumer's displacement

This patch adds a function to do following transformation:

%0:g8rc_and_g8rc_nox0 = ADDI8 %5:g8rc_and_g8rc_nox0, 144
STD killed %7:g8rc, 16, %0:g8rc_and_g8rc_nox0 :: (store 8 into %ir.8)

------>

STD killed %7:g8rc, 160, %5:g8rc_and_g8rc_nox0 :: (store 8 into %ir.8)

Reviewed By: steven.zhang

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




More information about the All-commits mailing list