]> granicus.if.org Git - llvm/commit
[X86] Don't use CombineTo to skip adding new nodes to the DAGCombiner worklist in...
authorCraig Topper <craig.topper@intel.com>
Thu, 26 Jul 2018 05:40:10 +0000 (05:40 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 26 Jul 2018 05:40:10 +0000 (05:40 +0000)
commit1726a8cfd34ab80e55a82b3dc6e78ae91edd2ef3
tree918f785879995fde02f67c9538972667b6203c43
parent00c4d032c89125607f83717e4de6fee005467143
[X86] Don't use CombineTo to skip adding new nodes to the DAGCombiner worklist in combineMul.

I'm not sure if this was trying to avoid optimizing the new nodes further or what. Or maybe to prevent a cycle if something tried to reform the multiply? But I don't think its a reliable way to do that. If the user of the expanded multiply is visited by the DAGCombiner after this conversion happens, the DAGCombiner will check its operands, see that they haven't been visited by the DAGCombiner before and it will then add the first node to the worklist. This process will repeat until all the new nodes are visited.

So this seems like an unreliable prevention at best. So this patch just returns the new nodes like any other combine. If this starts causing problems we can try to add target specific nodes or something to more directly prevent optimizations.

Now that we handle the combine normally, we can combine any negates the mul expansion creates into their users since those will be visited now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338007 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/mul-constant-i32.ll