[PATCH] D41062: [X86] Legalize v2i32 via widening rather than promoting

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 10 22:31:20 PST 2017


craig.topper created this revision.

Previously we promoted v2i32 to v2i64. This patch changes this to widen to v4i32 instead.

I think widening is a better behavior for illegal vectors. In fact we have an experimental flag to do just that, that has been around for a few years.

There are definitely a few deficiencies observed in here, but I think overall this is an improvement. I'll submit more patches for some of the issues.

One of my goals is to try to clean up some of the handling we have to do to account for the current legalization around masked load, store, gather, and scatter.


https://reviews.llvm.org/D41062

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  lib/Target/X86/X86ISelLowering.cpp
  test/Analysis/CostModel/X86/alternate-shuffle-cost.ll
  test/Analysis/CostModel/X86/arith.ll
  test/Analysis/CostModel/X86/fptoui.ll
  test/Analysis/CostModel/X86/masked-intrinsic-cost.ll
  test/Analysis/CostModel/X86/sitofp.ll
  test/Analysis/CostModel/X86/slm-arith-costs.ll
  test/Analysis/CostModel/X86/testshiftashr.ll
  test/Analysis/CostModel/X86/testshiftlshr.ll
  test/Analysis/CostModel/X86/testshiftshl.ll
  test/Analysis/CostModel/X86/uitofp.ll
  test/CodeGen/X86/2012-01-18-vbitcast.ll
  test/CodeGen/X86/2012-07-10-extload64.ll
  test/CodeGen/X86/avx2-masked-gather.ll
  test/CodeGen/X86/avx512-cvt.ll
  test/CodeGen/X86/avx512-schedule.ll
  test/CodeGen/X86/avx512-shuffles/broadcast-vector-int.ll
  test/CodeGen/X86/avx512-trunc.ll
  test/CodeGen/X86/avx512-vec-cmp.ll
  test/CodeGen/X86/bitcast-and-setcc-128.ll
  test/CodeGen/X86/bitcast-setcc-128.ll
  test/CodeGen/X86/compress_expand.ll
  test/CodeGen/X86/cvtv2f32.ll
  test/CodeGen/X86/i64-to-float.ll
  test/CodeGen/X86/insertelement-shuffle.ll
  test/CodeGen/X86/known-signbits-vector.ll
  test/CodeGen/X86/lower-bitcast.ll
  test/CodeGen/X86/masked_gather_scatter.ll
  test/CodeGen/X86/masked_memop.ll
  test/CodeGen/X86/mmx-cvt.ll
  test/CodeGen/X86/mmx-schedule.ll
  test/CodeGen/X86/mulvi32.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/pointer-vector.ll
  test/CodeGen/X86/pr34855.ll
  test/CodeGen/X86/ret-mmx.ll
  test/CodeGen/X86/sad.ll
  test/CodeGen/X86/scalar_widen_div.ll
  test/CodeGen/X86/shrink_vmul.ll
  test/CodeGen/X86/shuffle-strided-with-offset-128.ll
  test/CodeGen/X86/shuffle-vs-trunc-128.ll
  test/CodeGen/X86/sse-fsignum.ll
  test/CodeGen/X86/trunc-ext-ld-st.ll
  test/CodeGen/X86/vec_ctbits.ll
  test/CodeGen/X86/vec_extract-avx.ll
  test/CodeGen/X86/vec_extract-mmx.ll
  test/CodeGen/X86/vec_fp_to_int.ll
  test/CodeGen/X86/vec_insert-5.ll
  test/CodeGen/X86/vec_insert-7.ll
  test/CodeGen/X86/vec_insert-mmx.ll
  test/CodeGen/X86/vec_int_to_fp.ll
  test/CodeGen/X86/vec_zero_cse.ll
  test/CodeGen/X86/vector-sext.ll
  test/CodeGen/X86/vector-shuffle-mmx.ll
  test/CodeGen/X86/vector-trunc.ll
  test/CodeGen/X86/vector-zext.ll
  test/CodeGen/X86/vshift-4.ll
  test/CodeGen/X86/widen_arith-3.ll
  test/CodeGen/X86/widen_cast-5.ll
  test/CodeGen/X86/widen_conv-1.ll
  test/CodeGen/X86/widen_conv-2.ll
  test/CodeGen/X86/widen_conv-3.ll
  test/CodeGen/X86/widen_load-2.ll
  test/CodeGen/X86/x86-shifts.ll
  test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41062.126308.patch
Type: text/x-patch
Size: 216258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171211/a56700ff/attachment-0001.bin>


More information about the llvm-commits mailing list