[PATCH] D116191: [X86] isVectorShiftByScalarCheap - vXi8 select(shift(x,splat0),shift(x,splat1)) is better than shift(x,select(splat0,splat1))
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 23 04:10:16 PST 2021
- Previous message: [PATCH] D116191: [X86] isVectorShiftByScalarCheap - vXi8 select(shift(x,splat0),shift(x,splat1)) is better than shift(x,select(splat0,splat1))
- Next message: [PATCH] D116191: [X86] isVectorShiftByScalarCheap - vXi8 select(shift(x,splat0),shift(x,splat1)) is better than shift(x,select(splat0,splat1))
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:32997-33001
// XOP has v16i8/v8i16/v4i32/v2i64 variable vector shifts.
// Splitting for v32i8/v16i16 on XOP+AVX2 targets is still preferred.
if (Subtarget.hasXOP() &&
(Bits == 8 || Bits == 16 || Bits == 32 || Bits == 64))
return false;
----------------
RKSimon wrote:
> pengfei wrote:
> > I'm confused by the summary and the code here. Do we prefer to shifts on both has XOP and not? Why do we always return false for XOP?
> XOP has awesome per-element shift ops for all 128-bit vector types - so there's no need to prefer vector shifts by scalar amounts over per-element amounts.
Got it. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116191/new/
https://reviews.llvm.org/D116191
- Previous message: [PATCH] D116191: [X86] isVectorShiftByScalarCheap - vXi8 select(shift(x,splat0),shift(x,splat1)) is better than shift(x,select(splat0,splat1))
- Next message: [PATCH] D116191: [X86] isVectorShiftByScalarCheap - vXi8 select(shift(x,splat0),shift(x,splat1)) is better than shift(x,select(splat0,splat1))
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list