[all-commits] [llvm/llvm-project] 26ba16: [PowerPC] when folding rlwinm+rlwinm. to andi., we...

Chen Zheng via All-commits all-commits at lists.llvm.org
Wed Jan 8 17:59:17 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 26ba160d47220a0bce75b1f491bf6e262edf69fa
      https://github.com/llvm/llvm-project/commit/26ba160d47220a0bce75b1f491bf6e262edf69fa
  Author: Zheng Chen <czhengsz at cn.ibm.com>
  Date:   2020-01-08 (Wed, 08 Jan 2020)

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

  Log Message:
  -----------
  [PowerPC] when folding rlwinm+rlwinm. to andi., we should use first rlwinm
input reg.

%2:gprc = RLWINM %1:gprc, 27, 5, 10
%3:gprc = RLWINM_rec %2:gprc, 8, 5, 10, implicit-def $cr0

==>

%3:gprc = ANDI_rec %1, 0, implicit-def $cr0

we should use %1 instead of %2 as ANDI_rec input.

Reviewed By: steven.zhang

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




More information about the All-commits mailing list