[PATCH] D77299: [InstCombine] convert bitcast-shuffle to vector trunc
    Sanjay Patel via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Apr  2 14:06:37 PDT 2020
    
    
  
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1691
+      continue;
+    int LSBIndex = IsBigEndian ? (i + 1) * TruncRatio - 1 : i * TruncRatio;
+    if (Mask[i] != LSBIndex)
----------------
dsprenkels wrote:
> `i * TruncRatio` could in theory overflow for ridiculous types. Maybe consider using `int64_t` for `LSBIndex`?
Good catch (and I should've remembered from D76983...).
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77299/new/
https://reviews.llvm.org/D77299
    
    
More information about the llvm-commits
mailing list