Page MenuHomePhabricator

[PowerPC] Remove implicit use register after transformToImmFormFedByLI()
Needs ReviewPublic

Authored by lkail on Aug 5 2020, 3:11 AM.

Details

Reviewers
nemanjai
jsji
efriedma
ZhangKang
Group Reviewers
Restricted Project
Summary

When the instruction has imm form and fed by LI, we can remove the redundat LI instruction.
Below is an example:

renamable $x5 = LI8 2
renamable $x4 = exact SRD killed renamable $x4, killed renamable $r5, implicit $x5

will be converted to:

renamable $x5 = LI8 2
renamable $x4 = exact RLDICL killed renamable $x4, 62, 2,  implicit killed $x5

But when we do this optimization, we forget to remove implicit killed $x5
This bug has caused a lnt case error. This patch is to fix above bug.

Diff Detail

Unit TestsFailed

TimeTest
80 mslinux > Polly.Isl/Ast::alias_checks_with_empty_context.ll
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/Ast -polly-codegen-verify -polly-ast -analyze < /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/Ast/alias_checks_with_empty_context.ll | FileCheck /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/Ast/alias_checks_with_empty_context.ll

Event Timeline

ZhangKang created this revision.Aug 5 2020, 3:11 AM
ZhangKang requested review of this revision.Aug 5 2020, 3:11 AM
ZhangKang edited the summary of this revision. (Show Details)
ZhangKang edited the summary of this revision. (Show Details)
lkail commandeered this revision.Sep 9 2020, 11:34 PM
lkail added a reviewer: ZhangKang.