[SelectionDAG] Do minnum->minimum at legalization time instead of building time
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 1 Jul 2019 11:00:23 +0000 (11:00 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 1 Jul 2019 11:00:23 +0000 (11:00 +0000)
commited13fef47741d0a8fcaefeedbe6dc47a8552b928
treed75412ed85e522f7e096744d1a8ac4434dc5f2c1
parentd74f2d0a860907ae0cb6404737fa18b303593e4b
[SelectionDAG] Do minnum->minimum at legalization time instead of building time

The SDAGBuilder behavior stems from the days when we didn't have fast
math flags available in SDAG. We do now and doing the transformation in
the legalizer has the advantage that it also works for vector types.

llvm-svn: 364743
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/WebAssembly/f32.ll
llvm/test/CodeGen/WebAssembly/simd-arith.ll