[llvm] 7e0cc20 - [ARM] Remove unneeded AND node, now that ARM does not do UndefinedBooleanContent anymore (NFC) (#194253)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 08:05:37 PDT 2026
Author: LumioseSil
Date: 2026-05-01T16:05:32+01:00
New Revision: 7e0cc206cc03a0265996a14a454652a0594b8ea1
URL: https://github.com/llvm/llvm-project/commit/7e0cc206cc03a0265996a14a454652a0594b8ea1
DIFF: https://github.com/llvm/llvm-project/commit/7e0cc206cc03a0265996a14a454652a0594b8ea1.diff
LOG: [ARM] Remove unneeded AND node, now that ARM does not do UndefinedBooleanContent anymore (NFC) (#194253)
It has ZeroOrOneBooleanContent now, so it is optimized away in all cases
anyway.
Added:
Modified:
llvm/lib/Target/ARM/ARMISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 0f35f94f9b631..cbff40f697b9b 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -4907,11 +4907,6 @@ SDValue ARMTargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
}
}
- // ARM's BooleanContents value is UndefinedBooleanContent. Mask out the
- // undefined bits before doing a full-word comparison with zero.
- Cond = DAG.getNode(ISD::AND, dl, Cond.getValueType(), Cond,
- DAG.getConstant(1, dl, Cond.getValueType()));
-
return DAG.getSelectCC(dl, Cond,
DAG.getConstant(0, dl, Cond.getValueType()),
SelectTrue, SelectFalse, ISD::SETNE);
More information about the llvm-commits
mailing list