This is an archive of the discontinued LLVM Phabricator instance.

[X86][AVX] Add SimplifyDemandedVectorElts support for KSHIFTL/KSHIFTR
ClosedPublic

Authored by RKSimon on Aug 21 2019, 5:31 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Aug 21 2019, 5:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2019, 5:31 AM
craig.topper added inline comments.Aug 22 2019, 9:31 AM
lib/Target/X86/X86ISelLowering.cpp
34280 ↗(On Diff #216379)

The RHS should always be a ConstantSDNode. You don't need the dyn_cast. Probably can just assert that it's less the NumElts. We shouldn't form it with out of range values. There's no intrinsic for it. We just use shuffles.

RKSimon updated this revision to Diff 216798.Aug 23 2019, 4:01 AM

Applied @craig.topper's feedback

This revision is now accepted and ready to land.Aug 23 2019, 10:03 AM
This revision was automatically updated to reflect the committed changes.