[PATCH] D69038: [InstCombine] Fix miscompile bug in canEvaluateShuffled

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 10:56:01 PDT 2019


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

Please do make sure to precommit tests.
LGTM, but please wait for @spatel.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1069-1071
+      for (int i = 0, e = Mask.size(); i != e; ++i)
+        if (Mask[i] == -1)
+          return false;
----------------
```
if(llvm::any_of(Mask, [](int M){ return M == -1; }))
  return false;
```


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1101-1102
       // longer vector ops, but that may result in more expensive codegen. We
       // would also need to limit the transform to avoid undefined behavior for
       // integer div/rem.
       Type *ITy = I->getType();
----------------
Is this comment now outdated?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69038





More information about the llvm-commits mailing list