Flags-producing add, and, or, etc. have the same profibility
authorDan Gohman <gohman@apple.com>
Mon, 4 Jan 2010 20:51:50 +0000 (20:51 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 4 Jan 2010 20:51:50 +0000 (20:51 +0000)
rules as normal add, and, or, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92507 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index cb82383778587a914189a8a687ace52631ff7edd..c028376774eba5d7bb18bdf3c24a9ae9428bdaa5 100644 (file)
@@ -310,6 +310,11 @@ bool X86DAGToDAGISel::IsLegalAndProfitableToFold(SDNode *N, SDNode *U,
   if (U == Root)
     switch (U->getOpcode()) {
     default: break;
+    case X86ISD::ADD:
+    case X86ISD::SUB:
+    case X86ISD::AND:
+    case X86ISD::XOR:
+    case X86ISD::OR:
     case ISD::ADD:
     case ISD::ADDC:
     case ISD::ADDE: