[PATCH] D12093: [NVPTX] Support register copy from i16 to i32 register types

Justin Holewinski via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 17:39:23 PDT 2015


jholewinski added inline comments.

================
Comment at: lib/Target/NVPTX/NVPTXInstrInfo.cpp:40
@@ -39,2 +39,3 @@
 
-  if (DestRC->getSize() != SrcRC->getSize())
+  if (DestRC->getSize() != SrcRC->getSize()) {
+    // If the sizes differ it may be possible we are copying a i16 to a i32
----------------
jingyue wrote:
> Out of curiosity, which code pattern leads to 16-to-32 copy? Normally, COPY traditionally copies the same type. Later, I added int-to-float and float-to-int because bitcast does that. 
As far as I know, a register copy from i16 to i32 should not occur.  Trying to emit such a copy is usually an indication of something wrong earlier on.  Can you please explain precisely the case you're hitting?


http://reviews.llvm.org/D12093





More information about the llvm-commits mailing list