[llvm] d692f0f - [X86] Don't call LowerSETCC from LowerSELECT for STRICT_FSETCC/STRICT_FSETCCS nodes.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 11 20:44:19 PST 2020


Author: Craig Topper
Date: 2020-01-11T20:43:00-08:00
New Revision: d692f0f6c8c12316d559b9a638a2cb9fbd0c263d

URL: https://github.com/llvm/llvm-project/commit/d692f0f6c8c12316d559b9a638a2cb9fbd0c263d
DIFF: https://github.com/llvm/llvm-project/commit/d692f0f6c8c12316d559b9a638a2cb9fbd0c263d.diff

LOG: [X86] Don't call LowerSETCC from LowerSELECT for STRICT_FSETCC/STRICT_FSETCCS nodes.

This causes the STRICT_FSETCC/STRICT_FSETCCS nodes to lowered
early while lowering SELECT, but the output chain doesn't get
connected. Then we visit the node again when it is its turn
because we haven't replaced the use of the chain result. In the
case of the fp128 libcall lowering, after D72341 this will cause
the libcall to be emitted twice.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 54cef3183408..073b78b6ae67 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -22133,9 +22133,7 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
     }
   }
 
-  if (Cond.getOpcode() == ISD::SETCC ||
-      Cond.getOpcode() == ISD::STRICT_FSETCC ||
-      Cond.getOpcode() == ISD::STRICT_FSETCCS) {
+  if (Cond.getOpcode() == ISD::SETCC) {
     if (SDValue NewCond = LowerSETCC(Cond, DAG)) {
       Cond = NewCond;
       // If the condition was updated, it's possible that the operands of the


        


More information about the llvm-commits mailing list