[PATCH] D33311: [X86] Match bitcast of vsetcc to pmovmsk
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 03:45:34 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:29020
+ // vxi1 types.
+ if (!LegalTypes && N0.getOpcode() == ISD::SETCC)
+ if (SDValue V = combineBitcastOfSetCC(DAG, SDLoc(N), VT, N0, Subtarget))
----------------
zvi wrote:
> delena wrote:
> > zvi wrote:
> > > delena wrote:
> > > > Can you use if (VT.isInteger() && DAG.ComputeNumSignBits(N) == EltBits) ?
> > > i didn't understand the question. Can you please explain this point?
> > ISD::SETCC is a private case when you know about all-ones or all-zeroes. DAG.ComputeNumSignBits(N) == EltBits is more general.
> That's a good idea. Do you have an example of such a case?
>
combineVectorSignBitsTruncation should be a good example - it started with using the 'all bits' of a comparison result and was generalised to use DAG.ComputeNumSignBits later on
https://reviews.llvm.org/D33311
More information about the llvm-commits
mailing list