[PATCH] D88274: [PowerPC] Put the CR field in low bits of GRC during copying CRRC to GRC.
EsmeYi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 19:54:53 PDT 2020
Esme created this revision.
Esme added reviewers: steven.zhang, shchenz, jsji, nemanjai, PowerPC.
Herald added subscribers: llvm-commits, kbarton, hiraditya.
Herald added a project: LLVM.
Esme requested review of this revision.
********** EXPANDING POST-RA PSEUDO INSTRS **********
real copy: renamable $r3 = COPY killed renamable $cr0
replaced by: $r3 = MFOCRF $cr0
As shown above, how we copying the CRRC to GRC is using a single `MFOCRF` to copy the contents of CR field n (CR bits 4×n+32:4×n+35) into bits 4×n+32:4×n+35 of register GRC. That's not correct because we expect the value of destination register equals to source so we have to put the the contents of CR field in the lowest 4 bits.
This patch adds a `RLWINM` after `MFOCRF` to achieve that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88274
Files:
llvm/lib/Target/PowerPC/PPCInstrHTM.td
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/test/CodeGen/PowerPC/htm-ttest.ll
llvm/test/CodeGen/PowerPC/reg_copy.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88274.294218.patch
Type: text/x-patch
Size: 6559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/19314346/attachment.bin>
More information about the llvm-commits
mailing list