diff options
author | Craig Topper <craig.topper@gmail.com> | 2020-01-10 23:28:31 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2020-01-10 23:41:06 -0800 |
commit | c2ddfa876fa90008f1b4ff611256ad5dd4b36d96 (patch) | |
tree | b58dbcb424f76f4388248edccd1547ffbc1f59e4 /llvm/lib | |
parent | 5fe5c0a60f9a5f32da4316ba0d1732a1e439703b (diff) | |
download | bcm5719-llvm-c2ddfa876fa90008f1b4ff611256ad5dd4b36d96.tar.gz bcm5719-llvm-c2ddfa876fa90008f1b4ff611256ad5dd4b36d96.zip |
[X86] Simplify code by removing an unreachable condition. NFCI
For X87<->SSE conversions, the SSE type is always smaller than
the X87 type. So we can always use the smallest type for the
memory type.
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index a621d7ed740..4211a122ffd 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1058,12 +1058,7 @@ void X86DAGToDAGISel::PreprocessISelDAG() { // Here we could have an FP stack truncation or an FPStack <-> SSE convert. // FPStack has extload and truncstore. SSE can fold direct loads into other // operations. Based on this, decide what we want to do. - MVT MemVT; - if (N->getOpcode() == ISD::FP_ROUND) - MemVT = DstVT; // FP_ROUND must use DstVT, we can't do a 'trunc load'. - else - MemVT = SrcIsSSE ? SrcVT : DstVT; - + MVT MemVT = (N->getOpcode() == ISD::FP_ROUND) ? DstVT : SrcVT; SDValue MemTmp = CurDAG->CreateStackTemporary(MemVT); SDLoc dl(N); @@ -1116,12 +1111,7 @@ void X86DAGToDAGISel::PreprocessISelDAG() { // Here we could have an FP stack truncation or an FPStack <-> SSE convert. // FPStack has extload and truncstore. SSE can fold direct loads into other // operations. Based on this, decide what we want to do. - MVT MemVT; - if (N->getOpcode() == ISD::STRICT_FP_ROUND) - MemVT = DstVT; // FP_ROUND must use DstVT, we can't do a 'trunc load'. - else - MemVT = SrcIsSSE ? SrcVT : DstVT; - + MVT MemVT = (N->getOpcode() == ISD::STRICT_FP_ROUND) ? DstVT : SrcVT; SDValue MemTmp = CurDAG->CreateStackTemporary(MemVT); SDLoc dl(N); |