[all-commits] [llvm/llvm-project] 1b5774: [PowerPC] stop folding if result rlwinm mask is wr...

chen zheng via All-commits all-commits at lists.llvm.org
Wed Dec 25 18:56:35 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b57749a5334ae3d854c6f8732e741ef9f977219
      https://github.com/llvm/llvm-project/commit/1b57749a5334ae3d854c6f8732e741ef9f977219
  Author: czhengsz <czhengsz at cn.ibm.com>
  Date:   2019-12-25 (Wed, 25 Dec 2019)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
    M llvm/test/CodeGen/PowerPC/fold-rlwinm.mir

  Log Message:
  -----------
  [PowerPC] stop folding if result rlwinm mask is wrap while original rlwinm is not.

%1:g8rc = RLWINM8 %0:g8rc, 0, 16, 9
%2:g8rc = RLWINM8 killed %1:g8rc, 0, 0, 31
->
%2:g8rc = RLWINM8 %0:g8rc, 0, 16, 9

The above folding is wrong. Before transformation, %2:g8rc is 32 bit value. After
transformation, %2:g8rc becomes a 64 bit value.
This patch fixes above issue.

Reviewed by: steven.zhang

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




More information about the All-commits mailing list