[PATCH] D41895: [X86] Another attempt at support prefer-vector-width function attribute

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 12:51:21 PST 2018


craig.topper updated this revision to Diff 129323.
craig.topper added a comment.

Add canExtendTo512DQ and canExtendTo512BW helper methods to encapsulate hasAVX512/hasBWI and prefer vector width check into one place.

Always check VLX before checking prefer vector width. This means KNL/KNM won't honor prefer vector width in codegen, but they aren't know to have a performance problem like SKX. This reduces the number of behavior variations.

Improve testing to add command lines with/without prefer vector width and mixed with command lines without vlx to ensure the vector width preference is ignored without vlx.


https://reviews.llvm.org/D41895

Files:
  lib/Target/X86/X86.td
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  lib/Target/X86/X86TargetMachine.cpp
  lib/Target/X86/X86TargetTransformInfo.cpp
  test/CodeGen/X86/prefer-avx256-lzcnt.ll
  test/CodeGen/X86/prefer-avx256-mask-extend.ll
  test/CodeGen/X86/prefer-avx256-mask-shuffle.ll
  test/CodeGen/X86/prefer-avx256-popcnt.ll
  test/CodeGen/X86/prefer-avx256-shift.ll
  test/CodeGen/X86/prefer-avx256-trunc.ll
  test/CodeGen/X86/prefer-avx256-wide-mul.ll
  test/Transforms/LoopVectorize/X86/avx512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41895.129323.patch
Type: text/x-patch
Size: 93059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180110/737c2cd5/attachment-0001.bin>


More information about the llvm-commits mailing list