[PATCH] Canonicalize addrspacecast ConstExpr between different pointer types

Mark Heffernan meheff at google.com
Fri Jun 13 14:40:41 PDT 2014


Couple nits.  Otherwise LGTM.

================
Comment at: test/CodeGen/NVPTX/access-non-generic.ll:78
@@ -79,1 +77,3 @@
+; When hoisting an addrspacecast between different pointer types, replace the
+; addrspacecast with a bitcsat.
 define i32 @ld_int_from_float() {
----------------
spelling nit: bitcast.

================
Comment at: test/CodeGen/NVPTX/access-non-generic.ll:81
@@ -80,3 +80,3 @@
 ; IR-LABEL: @ld_int_from_float
-; IR: addrspacecast
+; IR: bitcast
 ; PTX-LABEL: ld_int_from_float(
----------------
Is there also an addrspacecast that you could/should check for?  It's more of a question than a request.

http://reviews.llvm.org/D4138






More information about the llvm-commits mailing list