If all lanes in a vector can be proven undef, then the result is undef. This patch implements and tests the GEP case. Once the masked.load patch (D57372) has landed, I'll update to include call tests as well.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
1922 | I'm not sure how to expose this in a regression test, but would it make sense to add this check to the bottom of SimplifyDemandedVectorElts() itself, so callers don't have to deal with this possibility themselves? |
Comment Actions
LGTM
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | ||
---|---|---|
1686 | Interest -> Intersect? |
Comment Actions
Looks like this change can produce invalid IR:
https://bugs.llvm.org/show_bug.cgi?id=41624
I'm not sure how to expose this in a regression test, but would it make sense to add this check to the bottom of SimplifyDemandedVectorElts() itself, so callers don't have to deal with this possibility themselves?