[PATCH] D46133: [InstCombine, ARM, AArch64] Convert table lookup to shuffle vector

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 13:31:30 PDT 2018


javed.absar added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:938
+  unsigned NumElts = VecTy->getNumElements();
+  assert((NumElts == 8) && "Unexpected number of elements in shuffle mask!");
+
----------------
Should we assert here or simply return nullptr?


================
Comment at: test/Transforms/InstCombine/AArch64/table-lookup.ll:2
+; RUN: opt -instcombine -S -o - %s | FileCheck %s
+
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
----------------
It would be nice to add a comment here to explain the purpose of this test.


https://reviews.llvm.org/D46133





More information about the llvm-commits mailing list