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

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 13:37:40 PST 2020


congzhe added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2634
+      CondVal->getType()->isVectorTy() == SelType->isVectorTy() &&
+      checkValWidth(TrueVal) && checkValWidth(FalseVal)) {
     // select C, 1, 0 -> zext C to int
----------------
spatel wrote:
> This seems more complicated than necessary. Can't we just transfer the check from the block above to here: 
>   if (SelType->isIntOrIntVectorTy() && !SelType->isIntOrIntVectorTy(1) && ...)
> 
> We can do that as an NFC preliminary patch regardless of whether we decide to proceed with this or not.
Thanks for the comment, now updated accordingly and will post this piece of code as another separate patch.


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

https://reviews.llvm.org/D93065



More information about the llvm-commits mailing list