[PATCH] D61806: [DAGCombiner] try to move bitcast after extract_subvector

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 14:59:07 PDT 2019


spatel created this revision.
spatel added reviewers: craig.topper, RKSimon, efriedma.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

I noticed that we were failing to narrow an x86 ymm math op in a case similar to the 'madd' test diff. That is because a bitcast is sitting between the math and the extract subvector and thwarting our pattern matching for narrowing:

       t56: v8i32 = add t59, t58
      t68: v4i64 = bitcast t56
    t73: v2i64 = extract_subvector t68, Constant:i64<2>
  t96: v4i32 = bitcast t73

There are a few wins and neutral diffs in the other tests.


https://reviews.llvm.org/D61806

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/X86/extractelement-fp.ll
  llvm/test/CodeGen/X86/madd.ll
  llvm/test/CodeGen/X86/oddshuffles.ll
  llvm/test/CodeGen/X86/sad.ll
  llvm/test/CodeGen/X86/vector-fshl-256.ll
  llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
  llvm/test/CodeGen/X86/vector-fshr-256.ll
  llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
  llvm/test/CodeGen/X86/vector-rotate-256.ll
  llvm/test/CodeGen/X86/vector-shift-ashr-256.ll
  llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61806.199087.patch
Type: text/x-patch
Size: 21716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190510/41154dfb/attachment.bin>


More information about the llvm-commits mailing list