You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
definevoid@insert_store_nonconst_index_not_known_valid_by_and(ptr%0, i8zeroext%1, i32%2) {
%4 = load <16 x i8>, ptr%0, align16%5 = andi32%2, 16%6 = insertelement <16 x i8> %4, i8%1, i32%5store <16 x i8> %6, ptr%0, align16retvoid
}
it exposes two issues. first, if the insertelement index is OOB, the result is a vector full of poison. however, on the ARM side, we get something like:
of course at this level, an OOB store is UB. so we don't have a refinement, and moreover, I don't know that we can easily fix this in the general case, as we can for other target-side UB like divide by zero and shift-past-bitwidth.
but that's not all! if we force the index to be in bounds like this:
definevoid@insert_store_nonconst_index_not_known_valid_by_and(ptr%0, i8zeroext%1, i32%2) {
%4 = load <16 x i8>, ptr%0, align16%5 = andi32%2, 15%6 = insertelement <16 x i8> %4, i8%1, i32%5store <16 x i8> %6, ptr%0, align16retvoid
}
then of course we don't have any problems with UB, but we still can't prove refinement. here's a src-tgt pair that doesn't seem too difficult, but it runs for 99 minutes and then I get "ERROR: SMT Error: smt tactic failed to show goal to be sat/unsat memout":
ah.... thanks Nuno, we missed that. they're not going to be happy about this since fixing it will add instructions, unless the fix is to make OOB InsertElement instructions UB.
I'll leave this issue open for the performance problem, but of course close if you want
here's an interesting test case that @tanmaytirpankar found:
it exposes two issues. first, if the insertelement index is OOB, the result is a vector full of poison. however, on the ARM side, we get something like:
of course at this level, an OOB store is UB. so we don't have a refinement, and moreover, I don't know that we can easily fix this in the general case, as we can for other target-side UB like divide by zero and shift-past-bitwidth.
but that's not all! if we force the index to be in bounds like this:
then of course we don't have any problems with UB, but we still can't prove refinement. here's a src-tgt pair that doesn't seem too difficult, but it runs for 99 minutes and then I get "ERROR: SMT Error: smt tactic failed to show goal to be sat/unsat memout":
The text was updated successfully, but these errors were encountered: