[llvm] [X86] Remove redundant TEST after shifts when count is non-zero (PR #169069)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 25 11:05:18 PST 2025
================
@@ -276,6 +276,15 @@ def X86xor_flag : SDNode<"X86ISD::XOR", SDTBinaryArithWithFlags,
def X86and_flag : SDNode<"X86ISD::AND", SDTBinaryArithWithFlags,
[SDNPCommutative]>;
+def SDTX86ShiftWithFlags : SDTypeProfile<2, 1, [
+ SDTCisSameAs<0, 2>,
+ SDTCisVT<1, i32>,
+]>;
+
+def X86shl : SDNode<"X86ISD::SHL", SDTX86ShiftWithFlags, [SDNPInGlue]>;
----------------
GrumpyPigSkin wrote:
I don't think I can use this SDTBinaryArithWithFlags since it requires both operands to have the same type. I am using just 1 operand + glue for the shift ops.
https://github.com/llvm/llvm-project/pull/169069
More information about the llvm-commits
mailing list