[PATCH] D116039: [X86] Combine reduce (add (mul x, y)) to VNNI instruction.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 20 07:10:32 PST 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:41756-41774
+// (mul (zext a), (sext, b))
+static bool detectExtMul(const SDValue &Mul, SDValue &Op0, SDValue &Op1) {
+ Op0 = Mul.getOperand(0);
+ Op1 = Mul.getOperand(1);
+
+ // The operand1 should be signed extend
+ if (Op0.getOpcode() == ISD::SIGN_EXTEND)
----------------
Any explicit checks for extension/truncation and their bitwidth delta instantly make me suspicious nowadays.
Does this deal with commutativity?
I think what you want to check is the number of known sign bits / known leading zero bits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116039/new/
https://reviews.llvm.org/D116039
More information about the llvm-commits
mailing list