[PATCH] D114487: [LAA] Support runtime checks for select GEP base pointers.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 21:51:09 PDT 2022
vitalybuka added a comment.
This patch is causing false reports with msan. I am trying to creduce the code. It's with TensorFlow, so far it's quite complicated.
I see that before the patch the pass produced
vector.memcheck: ; preds = %vector.scevcheck
%scevgep77 = getelementptr i32, i32* %retval.0.i.sroa.sel, i64 1, !dbg !1439
%scevgep7778 = bitcast i32* %scevgep77 to i8*, !dbg !1439
%bound0 = icmp ult i8* %scevgep73, %scevgep7778, !dbg !1439
%bound1 = icmp ult i8* %retval.0.i.sroa.sel76, %scevgep7475, !dbg !1439
%found.conflict = and i1 %bound0, %bound1, !dbg !1439
br i1 %found.conflict, label %scalar.ph, label %vector.ph
After the patch it's more complicated:
vector.memcheck: ; preds = %vector.scevcheck
%scevgep79 = getelementptr %"union.absl::container_internal::map_slot_type", %"union.absl::container_internal::map_slot_type"* %33, i64 0, i32 0, i32 1, i32 1, i32 0, i32 2, !dbg !1439
%scevgep7980 = bitcast i32* %scevgep79 to i8*, !dbg !1439
%scevgep81 = getelementptr %"union.absl::container_internal::map_slot_type", %"union.absl::container_internal::map_slot_type"* %33, i64 0, i32 0, i32 1, i32 2, i64 0, !dbg !1439
%bound0 = icmp ult i8* %scevgep73, %scevgep78, !dbg !1439
%bound1 = icmp ult i8* %scevgep7677, %scevgep7475, !dbg !1439
%found.conflict = and i1 %bound0, %bound1, !dbg !1439
%bound082 = icmp ult i8* %scevgep73, %scevgep81, !dbg !1439
%bound183 = icmp ult i8* %scevgep7980, %scevgep7475, !dbg !1439
%found.conflict84 = and i1 %bound082, %bound183, !dbg !1439
%conflict.rdx = or i1 %found.conflict, %found.conflict84, !dbg !1439
br i1 %conflict.rdx, label %scalar.ph, label %vector.ph
Then then when Msan instruments the code, it detects branch on uninitialized %conflict.rdx
I will continue to minimize the reproducer.
Should we revert the patch, because it breaks Msan and maybe there is a chance the bounds are calculated incorrectly?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114487/new/
https://reviews.llvm.org/D114487
More information about the llvm-commits
mailing list