Let GEP's ptr duplicate undef vars when idx is a vector type
MODIFY
ir/instr.cpp
ir/instr.cpp
@@ -2020,8 +2020,8 @@ StateValue GEP::toSMT(State &s) const {
else
offsets.emplace_back(sz, s[*idx]);
}
- vals.emplace_back(scalar(ptr_isvect ? aty->extract(ptrval, i) : ptrval,
- offsets));
+ vals.emplace_back(scalar(ptr_isvect ? aty->extract(ptrval, i) :
+ (i == 0 ? ptrval : s[*ptr]), offsets));
}
return getType().getAsAggregateType()->aggregateVals(vals);
}

ADD
tests/alive-tv/vector_undefptr.src.ll
+define <2 x i8*> @f() {
+ %a = getelementptr i8, i8* undef, <2 x i64> <i64 0, i64 0>
+ ret <2 x i8*> %a
+}

ADD
tests/alive-tv/vector_undefptr.tgt.ll
+define <2 x i8*> @f() {
+ ret <2 x i8*> undef
+}

Let GEP's ptr duplicate undef vars when idx is a vector type (#268)