[llvm] 4581d97 - [X86] Remove some uncovered and possibly broken code from combineZext.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 22:59:54 PST 2020
Author: Craig Topper
Date: 2020-02-03T22:59:39-08:00
New Revision: 4581d97416129cb2346de5041efc98891b13459d
URL: https://github.com/llvm/llvm-project/commit/4581d97416129cb2346de5041efc98891b13459d
DIFF: https://github.com/llvm/llvm-project/commit/4581d97416129cb2346de5041efc98891b13459d.diff
LOG: [X86] Remove some uncovered and possibly broken code from combineZext.
This code matches (zext (trunc (setcc_carry))) -> (and (setcc_carry), 1)
but the code never checks what type we're truncating too. An and
mask of 1 would only make sense if the trunc was to MVT::i1, but
we didn't check for that.
I believe this code is a leftover from when i1 was a legal type.
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 925958307004..0eee4e0d0913 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -43891,18 +43891,6 @@ static SDValue combineZext(SDNode *N, SelectionDAG &DAG,
}
}
- if (N0.getOpcode() == ISD::TRUNCATE &&
- N0.hasOneUse() &&
- N0.getOperand(0).hasOneUse()) {
- SDValue N00 = N0.getOperand(0);
- if (N00.getOpcode() == X86ISD::SETCC_CARRY) {
- return DAG.getNode(ISD::AND, dl, VT,
- DAG.getNode(X86ISD::SETCC_CARRY, dl, VT,
- N00.getOperand(0), N00.getOperand(1)),
- DAG.getConstant(1, dl, VT));
- }
- }
-
if (SDValue NewCMov = combineToExtendCMOV(N, DAG))
return NewCMov;
More information about the llvm-commits
mailing list