[PATCH] D104022: [llvm-stress] Fix dead code preventing us generating per-element vector selects

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 02:57:51 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG646e970d44d7: [llvm-stress] Fix dead code preventing us generating per-element vector selects (authored by RKSimon).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104022

Files:
  llvm/tools/llvm-stress/llvm-stress.cpp


Index: llvm/tools/llvm-stress/llvm-stress.cpp
===================================================================
--- llvm/tools/llvm-stress/llvm-stress.cpp
+++ llvm/tools/llvm-stress/llvm-stress.cpp
@@ -632,7 +632,7 @@
 
     // If the value type is a vector, and we allow vector select, then in 50%
     // of the cases generate a vector select.
-    if (isa<FixedVectorType>(Val0->getType()) && (getRandom() % 1)) {
+    if (isa<FixedVectorType>(Val0->getType()) && (getRandom() & 1)) {
       unsigned NumElem =
           cast<FixedVectorType>(Val0->getType())->getNumElements();
       CondTy = FixedVectorType::get(CondTy, NumElem);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104022.351385.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210611/35fed568/attachment.bin>


More information about the llvm-commits mailing list