diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-11-25 17:27:02 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-11-25 17:27:02 +0000 |
commit | 7336e7c67a5decf608c7b8f4ef0da571fb505313 (patch) | |
tree | 8a77d614f67b6ec24be6112279aeebdea0896482 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 2e5a25c1708260cfbadb4e799ee86202b0105f74 (diff) | |
download | bcm5719-llvm-7336e7c67a5decf608c7b8f4ef0da571fb505313.tar.gz bcm5719-llvm-7336e7c67a5decf608c7b8f4ef0da571fb505313.zip |
[x86] limit transform for select-of-fp-constants
This should likely be adjusted to limit this transform
further, but these diffs should be clear wins.
If we have blendv/conditional move, then we should assume
those are cheap ops. The loads become independent of the
compare, so those can be speculated before we need to use
the values in the blend/mov.
llvm-svn: 347526
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index bce188e399a..db9a1048876 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -18129,6 +18129,9 @@ SDValue DAGCombiner::foldSelectCCToShiftAnd(const SDLoc &DL, SDValue N0, SDValue DAGCombiner::convertSelectOfFPConstantsToLoadOffset( const SDLoc &DL, SDValue N0, SDValue N1, SDValue N2, SDValue N3, ISD::CondCode CC) { + if (!TLI.reduceSelectOfFPConstantLoads(N0.getValueType().isFloatingPoint())) + return SDValue(); + // If we are before legalize types, we want the other legalization to happen // first (for example, to avoid messing with soft float). auto *TV = dyn_cast<ConstantFPSDNode>(N2); |