[PATCH] D12058: [NVPTX] truncating 64-bit to 32-bit is free

Jingyue Wu via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 13:39:22 PDT 2015


jingyue marked an inline comment as done.

================
Comment at: lib/Target/NVPTX/NVPTXISelLowering.h:464
@@ +463,3 @@
+    // Truncating 64-bit to 32-bit is free in SASS.
+    if (!SrcTy->isIntegerTy() || !DstTy->isIntegerTy())
+      return false;
----------------
eliben wrote:
> I'd just && the four conditions in the 'return' statement here, would make it clearer IMHO. But it's just style so up to you
I'll keep what it is. It looks clearer to me: the first check as an early return against non-integer cases, and the remaining focuses at bitwidths. It could be that we later want to consider more types of trunc free and OR the bitwdith checks together. 


http://reviews.llvm.org/D12058





More information about the llvm-commits mailing list