]> granicus.if.org Git - llvm/commitdiff
[X86] Remove flag setting ISD nodes from computeKnownBitsForTargetNode
authorCraig Topper <craig.topper@intel.com>
Mon, 14 Aug 2017 15:28:49 +0000 (15:28 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 14 Aug 2017 15:28:49 +0000 (15:28 +0000)
Summary:
The flag result is an i32 type. But its only really used for connectivity. I don't think anything even assumes a particular format. We don't ever do any real operations on it. So known bits don't help us optimize anything.

My main motivation is that the UMUL behavior is actually wrong. I was going to fix this in D36654, but then realized there was just no reason for it to be here.

Reviewers: RKSimon, zvi, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36657

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

lib/Target/X86/X86ISelLowering.cpp

index bed9ff58468c4e28ab2522074abf364d48058f58..afe9ae3b6bd513d071853651fb0b667c312d9d6e 100644 (file)
@@ -26915,21 +26915,6 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
   Known.resetAll();
   switch (Opc) {
   default: break;
-  case X86ISD::ADD:
-  case X86ISD::SUB:
-  case X86ISD::ADC:
-  case X86ISD::SBB:
-  case X86ISD::SMUL:
-  case X86ISD::UMUL:
-  case X86ISD::INC:
-  case X86ISD::DEC:
-  case X86ISD::OR:
-  case X86ISD::XOR:
-  case X86ISD::AND:
-    // These nodes' second result is a boolean.
-    if (Op.getResNo() == 0)
-      break;
-    LLVM_FALLTHROUGH;
   case X86ISD::SETCC:
     Known.Zero.setBitsFrom(1);
     break;