[PATCH] D41895: [X86] Another attempt at support prefer-vector-width function attribute
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 12:25:31 PST 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86Subtarget.cpp:260
+ if (PreferVectorWidthOverride)
+ PreferVectorWidth = PreferVectorWidthOverride;
+ else if (Prefer256Bit)
----------------
craig.topper wrote:
> RKSimon wrote:
> > Do we need to assert for a sane value here (else in X86TargetMachine.cpp)?
> What do you consider a sane value? There's no bounds checking on the attribute coming in.
assert(IsPowerOf2(PreferVectorWidthOverride) && PreferVectorWidthOverride >= 128 )?
https://reviews.llvm.org/D41895
More information about the llvm-commits
mailing list