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

Jingyue Wu via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 17:31:19 PDT 2015


jingyue commandeered this revision.
jingyue edited reviewers, added: sfantao; removed: jingyue.

================
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
----------------
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. 

================
Comment at: lib/Target/NVPTX/NVPTXInstrInfo.cpp:51
@@ -41,1 +50,3 @@
+    }
     report_fatal_error("Copy one register into another with a different width");
+  }
----------------
The error message here needs to be updated. 

================
Comment at: test/CodeGen/NVPTX/reg-copy-int.ll:14
@@ +13,3 @@
+
+; CHECK-LABEL __omptgt__0_1045bf9_30_(
+; CHECK: ld.global.nc.u8 {{.*}}[[r1:%.+]], [%r{{.+}}];
----------------
I'd reduce this test case. The current one is too large to demonstrate what you're really testing. 


http://reviews.llvm.org/D12093





More information about the llvm-commits mailing list