[PATCH] D19935: [BasicAA] Compare GEP indices based on value
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 12:49:11 PDT 2016
ab added a comment.
Good catch; scary bug! The test is somewhat brittle though. What do you think of boiling it down to its essence; something like:
; PR27418 - Treat GEP indices with the same value but different types the same
; CHECK-LABEL: test_different_index_types
; CHECK: MustAlias: i16* %tmp1, i16* %tmp2
define void @test_different_index_types([2 x i16]* %arr) {
%tmp1 = getelementptr [2 x i16], [2 x i16]* %arr, i16 0, i32 1
%tmp2 = getelementptr [2 x i16], [2 x i16]* %arr, i16 0, i16 1
ret void
}
in struct-geps.ll ? Looks like that actually used to return NoAlias (because of the assumption that C1 && C2 implies C1 != C2 later on).
http://reviews.llvm.org/D19935
More information about the llvm-commits
mailing list