[DAGCombiner] Don't fold FCOPYSIGN vector sign operand casts
authorLuís Marques <luismarques@lowrisc.org>
Wed, 10 Feb 2021 14:24:15 +0000 (14:24 +0000)
committerLuís Marques <luismarques@lowrisc.org>
Wed, 10 Feb 2021 14:25:24 +0000 (14:25 +0000)
commitacac29ca4250281358ccdf6a258597a68999cd2d
tree8820f29b0268887ce057d44be0d7821f2761a8b5
parentbb69de3f415653cad5ac25b79c10e016ee74dcfe
[DAGCombiner] Don't fold FCOPYSIGN vector sign operand casts

Avoid doing the following combine for vector types:

```
copysign(x, fp_extend(y)) -> copysign(x, y)
copysign(x, fp_round(y)) -> copysign(x, y)
```

That combine seemed to impede the selection of vector instruction and cause
a mess in some circumstances.

Differential Revision: https://reviews.llvm.org/D96037
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/vector-fcopysign.ll
llvm/test/CodeGen/X86/combine-fcopysign.ll