[SelectionDAG] Respect multiple uses in SimplifyDemandedBits to SimplifyDemandedVecto...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Oct 2018 11:45:46 +0000 (11:45 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 7 Oct 2018 11:45:46 +0000 (11:45 +0000)
commit3b04a4e322e442690bab05d4163ed40d7fd9f950
tree871f36c07181bd2a4713cd1903a5bf5350c651f6
parent012fda59a5b47e52e8f766c30a661c620a8cca50
[SelectionDAG] Respect multiple uses in SimplifyDemandedBits to SimplifyDemandedVectorElts simplification

rL343913 was using SimplifyDemandedBits's original demanded mask instead of the adjusted 'NewMask' that accounts for multiple uses of the op (those variable names really need improving....).

Annoyingly many of the test changes (back to pre-rL343913 state) are actually safe - but only because their multiple uses are all by PMULDQ/PMULUDQ.

Thanks to Jan Vesely (@jvesely) for bisecting the bug.

llvm-svn: 343935
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/pmul.ll
llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/vector-mul.ll
llvm/test/CodeGen/X86/vector-trunc-math.ll