R600: Fix nonsensical implementation of computeKnownBits for BFE
[oota-llvm.git] / lib / Target / R600 / AMDGPUISelLowering.cpp
index bcac5408f375e4352dda4bdde320ef4c36572e64..6eebccdf9e2c7065eaf4930b8163284e58c16d25 100644 (file)
@@ -2377,11 +2377,7 @@ void AMDGPUTargetLowering::computeKnownBitsForTargetNode(
     unsigned BitWidth = 32;
     uint32_t Width = CWidth->getZExtValue() & 0x1f;
 
-    // FIXME: This could do a lot more. If offset is 0, should be the same as
-    // sign_extend_inreg implementation, but that involves duplicating it.
-    if (Opc == AMDGPUISD::BFE_I32)
-      KnownOne = APInt::getHighBitsSet(BitWidth, BitWidth - Width);
-    else
+    if (Opc == AMDGPUISD::BFE_U32)
       KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - Width);
 
     break;