[PATCH] Look through addrspacecasts when turning ptr comparisons into index comparisons.

Jingyue Wu jingyue at google.com
Fri Jun 6 18:56:49 PDT 2014


LGTM

================
Comment at: test/Transforms/InstCombine/icmp.ll:3
@@ -2,4 +2,3 @@
 
-target datalayout =
-"e-p:64:64:64-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
+target datalayout = "e-p:64:64:64-p1:16:16:16-p2:32:32:32-p3:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 
----------------
I would put a comment on what the pointer size is in each address space. This can make your test cases more clear.

http://reviews.llvm.org/D2593






More information about the llvm-commits mailing list