Avoid creating canonical induction variables for non-native types.
For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.
llvm-svn: 127884
diff --git a/llvm/test/Transforms/IndVarSimplify/pointer.ll b/llvm/test/Transforms/IndVarSimplify/pointer.ll
index 5eee655..d55bf98 100644
--- a/llvm/test/Transforms/IndVarSimplify/pointer.ll
+++ b/llvm/test/Transforms/IndVarSimplify/pointer.ll
@@ -9,7 +9,7 @@
; Indvars should be able to expand the pointer-arithmetic
; IV into an integer IV indexing into a simple getelementptr.
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64"
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-n:32:64"
define void @foo(i8* %A, i64 %n) nounwind {
entry: