[PATCH] D52935: [SelectionDAG] Add SimplifyDemandedBits to SimplifyDemandedVectorElts simplification

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 5 09:55:57 PDT 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, efriedma, arsenm, jonpa, andreadb.
Herald added a subscriber: wdng.

This patch enables SimplifyDemandedBits to call SimplifyDemandedVectorElts in cases where the demanded bits mask covers entire elements of a bitcasted source vector.

There are a couple of cases here where simplification at a deeper level (such as through bitcasts) prevents further simplification - CommitTargetLoweringOpt only adds immediate uses/users back to the worklist when we might want to combine the original caller again to see what else it can simplify.

As well as that I had to disable handling of bool vector until SimplifyDemandedVectorElts better supports some of their opcodes (SETCC, shifts etc.).

Fixes PR39178


Repository:
  rL LLVM

https://reviews.llvm.org/D52935

Files:
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx512-intrinsics-upgrade.ll
  test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
  test/CodeGen/X86/combine-pmuldq.ll
  test/CodeGen/X86/combine-shl.ll
  test/CodeGen/X86/mulvi32.ll
  test/CodeGen/X86/pmul.ll
  test/CodeGen/X86/pr35918.ll
  test/CodeGen/X86/shrink_vmul.ll
  test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
  test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
  test/CodeGen/X86/urem-seteq-vec-nonsplat.ll
  test/CodeGen/X86/vector-idiv-v2i32.ll
  test/CodeGen/X86/vector-mul.ll
  test/CodeGen/X86/vector-reduce-mul.ll
  test/CodeGen/X86/vector-trunc-math.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52935.168483.patch
Type: text/x-patch
Size: 78225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181005/49b0d2fb/attachment.bin>


More information about the llvm-commits mailing list