[PATCH] D55511: [TargetLowering] Add UNDEF folding to SimplifyDemandedVectorElts
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 10 06:56:02 PST 2018
RKSimon created this revision.
RKSimon added reviewers: niravd, efriedma, craig.topper, spatel, andreadb.
If all the demanded elements of the SimplifyDemandedVectorElts are known to be undef we can simplify to an ISD::UNDEF node.
This exposes an issue with a recursive DAGCombiner::visitINSERT_SUBVECTOR call if the inner node deletes a node then the outer depends upon. I've only been able to expose this with the SimplifyDemandedVectorElts change so will keep it as part of this patch (I'm happy to submit it as a pre-commit however - it causes no lit test changes so seems pretty superfluous).
ZERO constant folding will handled in a future patch - its a little trickier as we often have bitcasted zero values.
Repository:
rL LLVM
https://reviews.llvm.org/D55511
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/var-permute-256.ll
test/CodeGen/X86/vector-reduce-mul-widen.ll
test/CodeGen/X86/vector-reduce-mul.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55511.177503.patch
Type: text/x-patch
Size: 144448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181210/dae72817/attachment-0001.bin>
More information about the llvm-commits
mailing list