[llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/featuretest.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 25 15:44:04 PST 2003
Changes in directory llvm/test/Regression/Transforms/BasicAA:
featuretest.ll updated: 1.3 -> 1.4
---
Log message:
Add a new test for basicaa
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/BasicAA/featuretest.ll
diff -u llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.3 llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.4
--- llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.3 Sun Feb 9 13:01:00 2003
+++ llvm/test/Regression/Transforms/BasicAA/featuretest.ll Tue Feb 25 15:43:37 2003
@@ -51,3 +51,14 @@
ret int %r
}
+; Test that if two pointers are spaced out by a constant offset, that they
+; cannot alias, even if there is a variable offset between them...
+int %gep_distance_test2({int,int}* %A, long %distance) {
+ %A = getelementptr {int,int}* %A, long 0, ubyte 0
+ %REMOVEu = load int* %A
+ %B = getelementptr {int,int}* %A, long %distance, ubyte 1
+ store int 7, int* %B ; B cannot alias A, it's at least 4 bytes away
+ %REMOVEv = load int* %A
+ %r = sub int %REMOVEu, %REMOVEv
+ ret int %r
+}
More information about the llvm-commits
mailing list