[DAGCombiner] use root SDLoc for all nodes created by logic fold
authorSanjay Patel <spatel@rotateright.com>
Fri, 7 Dec 2018 00:01:57 +0000 (00:01 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 7 Dec 2018 00:01:57 +0000 (00:01 +0000)
commitc6441c8547fa7da42106625c867c29de0ae961cd
tree8943bc12a02984bc0e95418d620ae99d32b4c630
parent8c1cd213b7f76f6b567ba91c8faaca8e98a63f12
[DAGCombiner] use root SDLoc for all nodes created by logic fold

If this is not a valid way to assign an SDLoc, then we get this
wrong all over SDAG.

I don't know enough about the SDAG to explain this. IIUC, theoretically,
debug info is not supposed to affect codegen. But here it has clearly
affected 3 different targets, and the x86 change is an actual improvement.

llvm-svn: 348552
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/unfold-masked-merge-scalar-variablemask.ll
llvm/test/CodeGen/PowerPC/setcc-logic.ll
llvm/test/CodeGen/X86/unfold-masked-merge-vector-variablemask.ll