[PATCH] D149323: [SCEV] Don't invalidate past dependency-breaking instructions
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 01:34:58 PDT 2023
mkazantsev added a comment.
Consider example:
%sum = add i32 %x, %y
%load_p= gep ptr %p, i32 %sum
%load1 = load %i32 load_p
if (%load_1 == %sum) {
%load_2 = load %i32 load_p
%sum_2 = add i32 %load_2, 2
}
Here we can theoretically prove that SCEV for `%load_2` is `%x + %y` (same as `%sum`) and `%sum2 = %x + %y + 1`.
Now, imagine that we invalidate `%x`. With your patch, if I understand it correctly, `%sum_2` won't be invalidated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149323/new/
https://reviews.llvm.org/D149323
More information about the llvm-commits
mailing list