[PATCH] D25874: [X86][SSE] Add support for (V)PMOVSX* constant folding

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 10:55:13 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: zvi, delena, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

We already have (V)PMOVZX* combining support, this is the beginning of handling (V)PMOVSX* simililarly - other combines in combineVSZext can be generalized in future patches.

This unearthed an interesting bug in that we were generating illegal build vectors on 32-bit targets - it was proving difficult to create a test for it from PMOVZX, but it fired immediately with PMOVSX. I've created a more general form of the existing getConstVector to handle these cases - ideally this should be handled in non-target-specific code but I couldn't find an equivalent.

I have wondered whether we should not fold when OptSize=true?


Repository:
  rL LLVM

https://reviews.llvm.org/D25874

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/fold-vector-sext-zext.ll
  test/CodeGen/X86/pmul.ll
  test/CodeGen/X86/vector-idiv-sdiv-128.ll
  test/CodeGen/X86/vector-idiv-sdiv-256.ll
  test/CodeGen/X86/vector-idiv-sdiv-512.ll
  test/CodeGen/X86/vector-idiv-udiv-128.ll
  test/CodeGen/X86/vector-idiv-udiv-256.ll
  test/CodeGen/X86/vector-idiv-udiv-512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25874.75450.patch
Type: text/x-patch
Size: 18017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161021/f6058712/attachment.bin>


More information about the llvm-commits mailing list