[PATCH] D47339: [GVN,NewGVN] Propagate nonnull if K dominates J.
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 5 08:12:51 PDT 2018
nlopes added inline comments.
================
Comment at: test/Transforms/NewGVN/metadata-nonnull.ll:98
+; CHECK: bb1:
+; CHECK-NEXT: ret i8* [[V1]]
+; CHECK: bb2:
----------------
Somehow the line numbers changed. Getting back to my point: here "ret %v2" is replaced with "ret %v1". So it replaces a normal load with a nonnull load.
This is correct only if the nonnull load is UB. The use by "@use1" call does turn into UB if %v1 is poison. So we need to define if the load is UB or if it returns poison. I don't have any insight to have a preferred option, tough.
https://reviews.llvm.org/D47339
More information about the llvm-commits
mailing list