[llvm] [X86] Remove redundant code in X86 (PR #157687)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 08:19:23 PDT 2025
================
@@ -3489,19 +3489,8 @@ bool X86TargetLowering::isMaskAndCmp0FoldingBeneficial(
}
bool X86TargetLowering::hasAndNotCompare(SDValue Y) const {
- EVT VT = Y.getValueType();
-
- if (VT.isVector())
- return false;
-
- if (!Subtarget.hasBMI())
- return false;
-
- // There are only 32-bit and 64-bit forms for 'andn'.
- if (VT != MVT::i32 && VT != MVT::i64)
- return false;
-
- return !isa<ConstantSDNode>(Y) || cast<ConstantSDNode>(Y)->isOpaque();
+ // Can use andn for any scalar integer.
----------------
RKSimon wrote:
scalar andn is only available on BMI and only for i32/i64 instructions
https://github.com/llvm/llvm-project/pull/157687
More information about the llvm-commits
mailing list