[PATCH] Add VSX loads/stores to fastisel for PPC target

Bill Seurer seurer at linux.vnet.ibm.com
Fri Nov 14 16:15:58 PST 2014


================
Comment at: /home/seurer/llvm/llvm-oneoff/lib/Target/PowerPC/PPCFastISel.cpp:143
@@ +142,3 @@
+    bool isVSXRegister(unsigned Register) const {
+		   return ((Register != 0) && 
+             (MRI.getRegClass(Register)->getID() == PPC::VSFRCRegClassID));
----------------
echristo wrote:
> I'd prefer to pull the Register != 0 out of this so that we can keep the general pattern of checking it. Thoughts?
If the register is 0 then the call to getRegClass will fail in an assertion.  Or rather, another function it calls will fail.

================
Comment at: /home/seurer/llvm/llvm-oneoff/lib/Target/PowerPC/PPCFastISel.cpp:145
@@ -142,1 +144,3 @@
+             (MRI.getRegClass(Register)->getID() == PPC::VSFRCRegClassID));
+    }
     bool PPCEmitCmp(const Value *Src1Value, const Value *Src2Value,
----------------
wschmidt wrote:
> I'd like to see this named isVSFRCRegister or the like.  The VSFRC class comprises only the most-significant-half of each of the VSX registers (the VSRs), so I feel the name is misleading.
OK, done.

http://reviews.llvm.org/D6274






More information about the llvm-commits mailing list