[PATCH] D11220: Correct lowering of memmove in NVPTX
Jingyue Wu
jingyue at google.com
Wed Jul 15 10:22:52 PDT 2015
jingyue added inline comments.
================
Comment at: lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp:125
@@ +124,3 @@
+// }
+void convertMemMoveToLoop(Instruction *splitAt, Value *srcAddr, Value *dstAddr,
+ Value *len, bool srcVolatile, bool dstVolatile,
----------------
Argument names start with upper case.
================
Comment at: lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp:168
@@ +167,3 @@
+ Value *Element = LoopBuilder.CreateLoad(
+ LoopBuilder.CreateInBoundsGEP(srcAddr, {IndexPtr}), "element");
+ LoopBuilder.CreateStore(Element,
----------------
CreateInBoundsGEP(srcAddr, IndexPtr) should work now.
================
Comment at: lib/Target/NVPTX/NVPTXTargetMachine.cpp:69
@@ -67,2 +68,3 @@
+ PassRegistry &PR = *PassRegistry::getPassRegistry();
initializeNVVMReflectPass(*PassRegistry::getPassRegistry());
initializeGenericToNVVMPass(*PassRegistry::getPassRegistry());
----------------
Do you intend to use `PR` instead?
================
Comment at: test/CodeGen/NVPTX/lower-aggr-copies.ll:21
@@ +20,3 @@
+; IR: loadstoreloop:
+; IR: [[LOADPTR:%[0-9]+]] = getelementptr i8, i8* %src, i64
+; IR-NEXT: [[VAL:%[0-9]+]] = load i8, i8* [[LOADPTR]]
----------------
How come we don't see inbounds here? You created them using `CreateInBoundsGEP`.
Repository:
rL LLVM
http://reviews.llvm.org/D11220
More information about the llvm-commits
mailing list