[PATCH] D37880: Fix an out-of-bounds shufflevector index bug

Jatin Bhateja via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 22:35:41 PDT 2017


jbhateja added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14472
 
-    NearestPow2 = PowerOf2Ceil(MaxIndex);
+    NearestPow2 = PowerOf2Ceil(MaxIndex + 1);
     if (InVT.isSimple() && (NearestPow2 > 2) &&
----------------
If MaxIndex is same as MaxSize of vector it will cause later split (line #14475) to be futile.


https://reviews.llvm.org/D37880





More information about the llvm-commits mailing list