[PATCH] [NVPTX] aligned byte-buffers for vector return types

Eli Bendersky eliben at google.com
Fri Oct 3 16:08:33 PDT 2014


================
Comment at: lib/Target/NVPTX/NVPTXISelLowering.cpp:1358
@@ -1357,2 +1357,3 @@
     unsigned resultsz = TD->getTypeAllocSizeInBits(retTy);
-    if (retTy->isSingleValueType()) {
+    if (retTy->isFloatingPointTy() || retTy->isIntegerTy() ||
+        retTy->isPointerTy()) {
----------------
Can you add a comment that explains why these types are handled?

================
Comment at: test/CodeGen/NVPTX/vector-return.ll:1
@@ +1,2 @@
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_35 | FileCheck %s
+
----------------
The name of the test is very generic but you're just checking the alignment. Perhaps it would be better to either make the test name more specific, or alternatively check for more things in it?

================
Comment at: test/CodeGen/NVPTX/vector-return.ll:3
@@ +2,3 @@
+
+declare fastcc <2 x float> @bar(<2 x float> %input)
+
----------------
Is there a significance to fastcc here? If yes, please add a comment :)

http://reviews.llvm.org/D5612






More information about the llvm-commits mailing list