[PATCH] Add support for __nvvm_reflect changes in libdevice in CUDA-7.0

Eli Bendersky eliben at google.com
Wed Mar 18 16:52:45 PDT 2015

Comment at: lib/Target/NVPTX/NVVMReflect.cpp:182
@@ +181,3 @@
+    const Value *Operand = cast<Constant>(Sym)->getOperand(0);
+    if (isa<GlobalVariable>(Operand)) {
+      // For CUDA-7.0 style __nvvm_reflect calls we need to find operand's
It may be more idiomatic to use dyn_cast here and then get your Operand*, removing the following cast<>s
It's done a bunch all over llvm

Comment at: test/CodeGen/NVPTX/nvvm-reflect.ll:52
@@ +51,3 @@
+define float @bar(float %a, float %b) {
+; USE_MUL_0: define float @bar
Mention that this is the CUDA 7 version



More information about the llvm-commits mailing list