[PATCH] D50986: [ShrinkWrap] Don't put pseudo-instrs which use $sp before prologue setup
Vladimir Stefanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 10:28:29 PDT 2018
vstefanovic added a comment.
Thanks for the comments, adding $sp as implicit operand is a lot better, no need to modify ShrinkWrapping then.
An example - BuildPair64 loads 64 bits into a FPR from two GPRs.
$d0 = BuildPairF64 $zero, $zero
This is later usually expanded to mtc1 + mthc1:
$f0 = MTC1 $zero
$d0 = MTHC1_D32 $d0, $zero
but when mthc1 isn't available (e.g. for '-mfpxx -mcpu=mips32'), $d0 is loaded via stack:
SW $zero, $sp, 16
SW $zero, $sp, 20
$d0 = LDC1 $sp, 16
(I'll update commit message if this is ok.)
================
Comment at: test/CodeGen/Mips/shrink-wrap-buildpairf64-extractelementf64.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+
----------------
thegameg wrote:
> Can you please add a MIR test with `-start-before shrink-wrap -stop-after prologepilog` instead of an IR test?
I also need to check whether $sp is added to implicit operands in the isel pass.
There could be a separate test for that, but I found it more convenient to cover everything with one input.
Repository:
rL LLVM
https://reviews.llvm.org/D50986
More information about the llvm-commits
mailing list