[PATCH] D31189: [InstCombine] Fix folding of select into phi nodes when incoming element of phi is a vector type

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 06:25:48 PDT 2017


anna added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:913
+      // FalseVInPred versus TrueVInPred. It does not investigate the `nullness`
+      // of individual elements in the vector (and will always return false).
+      if (InC && !isa<ConstantExpr>(InC) && !isa<VectorType>(InC->getType()))
----------------
I will remove the `will always return false` part in the comment. That is incorrect. 
Comment will be changed to:
```
For vector constants, we cannot use isNullValue to fold into FalseVInPred versus TrueVInPred. When we have individual nonzero elements in the vector, we will still incorrectly fold to `TrueVInPred`. 
```


https://reviews.llvm.org/D31189





More information about the llvm-commits mailing list