[PATCH] D60514: [DAGCombiner][x86] scalarize inserted vector FP ops
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 03:11:10 PDT 2019
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with a few minors
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18711
+ const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+ if (N0Index != N1Index || !TLI.isExtractVecEltCheap(VT, N0Index))
+ return SDValue();
----------------
This might be too harsh as the BV ops might be available as cheap scalars already - add a TODO for now?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18717
+ EVT ScalarVT = X.getValueType();
+ if (ScalarVT != Y.getValueType())
+ return SDValue();
----------------
Do this check earlier?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18722
+ // build_vec ...undef, (bo x, y), undef...
+ SDValue ScalarBO = DAG.getNode(N->getOpcode(), SDLoc(N), ScalarVT, X, Y,
+ N->getFlags());
----------------
Check legality of scalar binop?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60514/new/
https://reviews.llvm.org/D60514
More information about the llvm-commits
mailing list