[PATCH] D32338: InstructionSimplify: Canonicalize shuffle operands. NFC-ish.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 08:43:58 PDT 2017
spatel added inline comments.
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4140-4142
- if (isa<UndefValue>(Mask))
- return UndefValue::get(RetTy);
-
----------------
I got confused by the order of the patches/dependencies. This patch is proposing to remove this check that would be added by D32293. That's because the code in this patch will tell us that MaskSelects0 && MaskSelects1 are false, and that will then fall into ConstantFoldShuffleVectorInstruction and get folded?
I would've just left this check here as an early exit for the easy case.
FWIW, this may just be a case of too many cooks in the kitchen. :)
I think the end result of these 2 patches covers everything that we want in the current set of regression tests.
Repository:
rL LLVM
https://reviews.llvm.org/D32338
More information about the llvm-commits
mailing list