[PATCH] D68576: [PowerPC] Fix VSX clobbers of CSR registers

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 13:13:15 PST 2019


nemanjai marked 2 inline comments as done.
nemanjai added a comment.

Thanks for your comments. I'll address them and commit this.



================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:14320
+    if (VSNum < 32)
+      return std::make_pair(PPC::VSL0 + VSNum, &PPC::VSRCRegClass);
+    return std::make_pair(PPC::V0 + VSNum - 32, &PPC::VSRCRegClass);
----------------
jsji wrote:
> Do we need to consider 32 or 64 bits regclass here? If not, maybe we should add some comments to explain?
I believe you mean `VSSRC/VSFRC` (i.e. the scalar VSX registers). I believe those have to be named as `f<N>` or `vs<N>` in the clobbers list so we should still handle them correctly.


================
Comment at: test/CodeGen/PowerPC/inline-asm-vsx-clobbers.ll:3
+; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
+; RUN:   -enable-ppc-quad-precision -ppc-vsr-nums-as-vr \
+; RUN:   -ppc-asm-full-reg-names < %s | FileCheck %s
----------------
jsji wrote:
> Why we need `-enable-ppc-quad-precision` here?
Ha ha, good catch. That's just an errant option. I'll remove it on the commit.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68576/new/

https://reviews.llvm.org/D68576





More information about the llvm-commits mailing list