[PATCH] D93065: [InstCombine] Disable optimizations of select instructions that causes propagation of poison values

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 04:40:28 PST 2021


aqjune added a comment.

In D93065#2486134 <https://reviews.llvm.org/D93065#2486134>, @nikic wrote:

> @aqjune Do you have any automated way of duplicating the InstCombine tests with logical and/or, similar to what you did for insertelement? Or does this have to be done by hand?

Technically, it wouldn't be hard.
But I'm slightly concerned that the situation is slightly different from the vector's poison vector placeholder patches, because this is about disabling optimizations.
A mail should be sent to llvm-dev to notify this issue and people should be aware that performance degradation may happen.
Well, the root problem is that I don't have enough time for this for a while until the end of Jan. :( I don't want someone else to take over the responsibility either; this would be a lot of work.

I think the modest solution is to simply revert the poison constant folding patch (D92270 <https://reviews.llvm.org/D92270>), except a few cases like division. select -> and/or won't interact with poison from div undef because executing div undef already raises UB in src.
After the select -> and/or is removed, the patch should definitely be applied again,


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93065/new/

https://reviews.llvm.org/D93065



More information about the llvm-commits mailing list