[PATCH] D52747: [InstCombine] reverse 'trunc X to <N x i1>' canonicalization
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 1 23:19:12 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:1712
+ // For vectors: icmp ne (and X, 1), 0 --> trunc X to N x i1
+ // TODO: We canonicalize to the longer form for scalars. Why?
+ if (Cmp.getPredicate() == CmpInst::ICMP_NE && Cmp.getType()->isVectorTy() &&
----------------
Should this be in foldICmpAndConstConst? And it should use the APInts we already extracted?
https://reviews.llvm.org/D52747
More information about the llvm-commits
mailing list