[SelectionDAG] Add [us]itofp(undef) --> 0 constant fold (PR39205)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 3 Jun 2019 13:02:07 +0000 (13:02 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 3 Jun 2019 13:02:07 +0000 (13:02 +0000)
commitcb7e4e8193f3504073932f9e9337fec6ab7675df
treebedcf81468a20eed4e0f8629042693214094b953
parent74467814f27e3da681a4faaf3edbaeb493a036b6
[SelectionDAG] Add [us]itofp(undef) --> 0 constant fold (PR39205)

We were missing this fold in the DAG, which I've copied directly from llvm::ConstantFoldCastInstruction

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

llvm-svn: 362397
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/avx512-cvt-widen.ll
llvm/test/CodeGen/X86/avx512-cvt.ll
llvm/test/CodeGen/X86/vec_int_to_fp-widen.ll
llvm/test/CodeGen/X86/vec_int_to_fp.ll