[DAG] Fold (bitcast (logicop (bitcast x), (c))) -> (logicop x, (bitcast c)) iff the...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Mar 2023 14:41:11 +0000 (14:41 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Mar 2023 14:41:11 +0000 (14:41 +0000)
commit4bf004e07e2b9d6e04e3f33e1b02628c679de664
tree89b7e2172605bfaab0492e6350f973434f2410a6
parentf652bfeba583987b44c2a76ec2f4b5ec168977c8
[DAG] Fold (bitcast (logicop (bitcast x), (c))) -> (logicop x, (bitcast c)) iff the current logicop type is illegal

Try to remove extra bitcasts around logicops if we're dealing with illegal types

Fixes the regressions in D145939

Differential Revision: https://reviews.llvm.org/D146032
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AMDGPU/fneg.ll