aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2019-12-13 00:02:41 -0800
committerCraig Topper <craig.topper@gmail.com>2019-12-13 00:14:41 -0800
commit5c80a4f454ac6dad09e5c27f32a28af62cdb4d13 (patch)
tree2e9a93fcd9fede8a4faf0690b71591985c0ba5d0 /llvm/lib/CodeGen
parent21fbd5587cdfa11dabb3aeb0ead2d3d5fd0b490d (diff)
downloadllvm-5c80a4f454ac6dad09e5c27f32a28af62cdb4d13.zip
llvm-5c80a4f454ac6dad09e5c27f32a28af62cdb4d13.tar.gz
llvm-5c80a4f454ac6dad09e5c27f32a28af62cdb4d13.tar.bz2
[LegalizeTypes] Remove unnecessary if before calling ReplaceValueWith on the chain in SoftenFloatRes_LOAD.
I believe this is a leftover from when fp128 was softened to fp128 on X86-64. In that case type legalization must have been able to create a load that was the same as N which would make this replacement fail or assert. Since we no longer do that, this check should be unneeded.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 4bea871..a563845 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -660,8 +660,7 @@ SDValue DAGTypeLegalizer::SoftenFloatRes_LOAD(SDNode *N) {
L->getAAInfo());
// Legalized the chain result - switch anything that used the old chain to
// use the new one.
- if (N != NewL.getValue(1).getNode())
- ReplaceValueWith(SDValue(N, 1), NewL.getValue(1));
+ ReplaceValueWith(SDValue(N, 1), NewL.getValue(1));
return NewL;
}