[PATCH] D60514: [DAGCombiner][x86] scalarize inserted vector FP ops

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 08:12:28 PDT 2019


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

  // bo (build_vec ...undef, x, undef...), (build_vec ...undef, y, undef...) -->
  // build_vec ...undef, (bo x, y), undef...

The lifetime of the nodes in these examples is different for variables versus constants, but they are all build vectors briefly, so I'm proposing to catch them in this form to handle all of the leading examples in the motivating test file.

Before we have build vectors, we might have insert_vector_element. After that, we might have scalar_to_vector and constant pool loads.

It's going to take more work to ensure that FP vector operands are getting simplified with undef elements, so this transform can apply more widely. In a non-loose FP environment, we are likely simplifying FP elements to NaN values rather than undefs.

We also need to allow more opcodes down this path. Eg, we don't handle FP min/max flavors yet.


https://reviews.llvm.org/D60514

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/X86/scalarize-fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60514.194518.patch
Type: text/x-patch
Size: 16592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190410/c8b29a49/attachment.bin>


More information about the llvm-commits mailing list