]> granicus.if.org Git - llvm/commit
[X86][AVX] Access a scalar float/double as a free extract from a broadcast load ...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 6 Oct 2019 21:11:45 +0000 (21:11 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 6 Oct 2019 21:11:45 +0000 (21:11 +0000)
commit2e0c9d36c225a71f220308d3f68ea8769e103012
treeada50140dd8f4b64c417e5c4b21e56e6c7bd92b4
parent30e2e414edd47eb76798862facddd6f770b412cc
[X86][AVX] Access a scalar float/double as a free extract from a broadcast load (PR43217)

If a fp scalar is loaded and then used as both a scalar and a vector broadcast, perform the load as a broadcast and then extract the scalar for 'free' from the 0th element.

This involved switching the order of the X86ISD::BROADCAST combines so we only convert to X86ISD::BROADCAST_LOAD once all other canonicalizations have been attempted.

Adds a DAGCombinerInfo::recursivelyDeleteUnusedNodes wrapper.

Fixes PR43217

Differential Revision: https://reviews.llvm.org/D68544

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373871 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-vbroadcast.ll