[PATCH] D19675: [InstCombine][AVX2] Add support for simplifying AVX2 per-element shifts to native shifts
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 11:14:22 PDT 2016
majnemer accepted this revision.
majnemer added a reviewer: majnemer.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:377-378
@@ +376,4 @@
+ for (int I = 0; I < NumElts; ++I) {
+ auto *CElt = CShift->getAggregateElement(I);
+ if (isa<UndefValue>(CElt)) {
+ ShiftAmts.push_back(-1);
----------------
getAggregateElement can return null.
perhaps:
if (CElt && isa<UndefValue(CElt))
Repository:
rL LLVM
http://reviews.llvm.org/D19675
More information about the llvm-commits
mailing list